Most voted "mysql" questions
Mysql is a relational database management system (RDBMS) that functions as a server, and provides access to multiple users simultaneously. Your source code is available under the GNU General Public License.
Learn more…10,264 questions
Sort by count of
-
1
votes0
answers128
viewsProblem connecting to Mysql from Visual Studio
I am trying to make the connection by Visual Studio, when I will configure by 'Data Source Configuration Wizard' is showing an error: Since I already imported and referenced the . dll(s) from Mysql…
-
1
votes2
answers1371
viewsUse mysql_fetch_assoc more than once
I have a big question about mysql_fetch_assoc in while. what happens is the following, I have a page where I do a database search and return to a while existing information with mysql_fetch_assoc,…
-
1
votes1
answer681
viewsHow can I update a mysql blob field using php
if(isset($_POST['submit_edit'])) { if (empty($_POST['imagem'])){ $titulo = $_POST['titulo']; $texto = $_POST['texto']; $query ="UPDATE SERVICOS SET TITULO=\"$titulo\",TEXTO=\"$texto\" WHERE…
-
1
votes1
answer2179
viewsAjax is returning me an array and now, how to separate?
My Ajax request is returning 3 records of a PHP query (yes, I’m sure), so we have arrays of the type: array 1 ["João", "19/05/1986", "masculino", "Programador", "Campo Grande"] array 2 ["Maria",…
-
1
votes2
answers664
viewsPhone book with database
I have a phone book with the form already ready and now I need that when the user type in the field search a name or sector, this value should be compared with values of the database and be returned…
-
1
votes1
answer116
viewsSearch 3 results from the same table grouped by the same id
I have the tbl_ocorrencias which records occurrences of a particular vehicle. That is, the table consists of the following: - tbl_ocorrencias - id_ocorrencia id_viatura data hora In this case, an…
-
1
votes1
answer894
viewsHow to insert image in Mysql using Hibernate?
I am using java with Hibernate and would like to know how to insert an image in the mysql database. I have several information being persisted with Hibernate, missing only the image.
-
1
votes1
answer3714
viewsMysql - Count different values from the same field
I have the following table: Tabela partidas +----+----------+------+---------------------+ | id | name | win | date | +----+----------+------+---------------------+ | 1 | Fulano | Y | 2014-01-01…
-
1
votes2
answers1373
viewsHow to make a select with dynamic columns for each like?
I am making a select for a report of calls per carrier and each column of amount, I have a composite select that should return me the amount of calls from each carrier. SELECT date(calldate) as…
mysqlasked 10 years, 3 months ago fabricio_wm 1,090 -
1
votes2
answers586
viewsInsert mysql using ajax
I am trying to enter registration in BD via ajax but am having problems, I was using the format: 'json' but I was giving permission error and Alz, now I’m using type: "POST", dataType: "jsonp".…
-
1
votes2
answers565
viewsFormat String to insert into Mysql (TIMESTAMP)
I need to insert a string that is like: "2014-11-25T14:13:35.000Z" in a Mysql database and using PHP in a field TIMESTAMP. How can I format the string for insertion using PHP?…
-
1
votes1
answer113
viewsHow to return the 'Parent ID (Main)' in this Mysql query?
I’m trying to return the parent ID at the highest level in a query, this is the information: ID NOME PARENT_ID 1 Project (null) 2 Sub 1 3 Sub-Sub 2 4 Sub-Sub-Sub 3 I need this: ID NOME PARENT_ID…
mysqlasked 9 years, 11 months ago Alessandro Gomes 730 -
1
votes1
answer1218
viewsSearching for the next record and the previous record using two columns for sorting different tables
I have the following database structure: ___ Table: modules___ id int(10) name varchar(50) position int(10) ___ Table: lessons ___ id int(10) module_id int(10) FK position int(10) name varchar(50)…
-
1
votes1
answer68
viewsRead contents of a netflow package
I’m developing a tool that captures every UDP package that goes through my firewall (an Openbsd 5.4, simulated by a virtual machine), but I’m having trouble extracting the information I need from…
-
1
votes1
answer384
viewsBatch Insert using Pdo and transaction
Good morning guys I’m a little new in the world ai php mysql and I’m in need of a help I am inserting data in my bd in 6 tables, data comes from txt files some files have 5000 lines with 163 records…
-
1
votes2
answers547
viewsForeach - check and record only those not in the BD
Inside a foreach I need to make an Insert in my database only of the records that are not recorded, thus avoiding duplication of records, but I couldn’t imagine a solution to check if a record is…
-
1
votes1
answer899
viewsImplementation n for n relationship in Delphi
It may be something simple for most, but I would like to know how to implement in practice a n-to-n relationship between Mysql tables using Delphi. I created the diagram of my BD in Mysql Workbench,…
-
1
votes1
answer625
viewsHow do I send data from a Jtable to my BD?
I have a filled-in Jtable and need to store its data in a table in my database. How do I do that? I only know the reverse way (fill a table from the BD) am using Mysql
-
1
votes2
answers474
viewsConvert an entire number from the database into an Array
I want to convert an entire number from the BD into an Array, for example: I have the number of deliveries registered in the BD, let’s assume that the 'x' production is completed in 5 deliveries.…
-
1
votes2
answers770
viewsHow to calculate average time?
I have a table named visitantes in it I insert the hora_que_entrou and the hora_que_saiu of my user on my website. These are in format DATETIME. I would like to run the average they passed onlines,…
-
1
votes1
answer103
viewsCREATE DATABASE via a PHP script?
How could I create a database every time for example a user, in this case, a company registers on my web system? Like, today, the only thing I have is administrative access data to FTP and database…
-
1
votes1
answer72
viewsOR returns unexpected result
I’m performing that function SELECT COUNT(id) FROM `system_stats` WHERE `name` = 1 OR 0 AND `us_id` = 0 It returns me a value equal to 1, but this 1 no, when I run separately this way, it returns me…
-
1
votes1
answer1355
viewsSystem.Argumentexception when using Mysql with Entity framework
I installed Mysql Connect in the environment, installed Mysql references through Nuget package. When I start the system and try to make an entry in the database, the following error appears: The…
-
1
votes1
answer233
viewsHow do ORDER BY with information that may vary?
I’m getting a list of articles from a database and I want to have on page one tool that allows me to list them in order of date they were written or in alphabetical order. Here I have my bank…
-
1
votes0
answers85
viewsPlugin javascript or jquery stars
Obs: I don’t know if you can ask this question here, if not! Please disregard/delete. Does anyone know any plugin that I can make this screen(the rating): Where this classification I’m trying to do,…
-
1
votes1
answer295
viewsReorder position in a sequence via Mysql
I have a table of Chamados. I have to add a whole column that will be called sequencia and will be used to search in the order the user wants. Just to illustrate: the call will have some arrows,…
-
1
votes2
answers623
views -
1
votes3
answers70
viewsHow to add two values?
while($row = mysql_fetch_assoc($result)) { if($row['level'] == '1') //COMO ADICIONO PARA OUTRO NIVEL CONSEGUIR VER ESTA PAGINA? { echo('OLAAAA'); } else { echo('NAO TENS ACESSO A ESTA PAGINA'); } }…
-
1
votes2
answers2266
views -
1
votes2
answers1206
views -
1
votes2
answers586
viewsDifferent databases for the same Asp.net C#
In a club management system each club has its own database. There is a class DAL where it is responsible for obtaining the web.config to string of application connection. How to ensure that at login…
-
1
votes3
answers353
viewsHow can I split this INSERT into steps?
I have 70MIL records to insert into one Tabela3 from Tabela1 - 4 fields and table 2 - 1 field. The following code does exactly what I need the most optimized way a user has helped me build. INSERT…
-
1
votes2
answers661
viewsSearch in a JSON encoding field
There is a field in the table where the content before being written is encoded in JSON. The content is saved as follows: [["nome_completo","Ana Concei\u00e7\u00e3o Dias"],["idade","27…
-
1
votes0
answers130
viewsAccentuation in select
I’m trying to export some records from the Mysql database to Excel, But when you open the spreadsheet where there’s an accentuation, there’s a sign that I can sort this out?
mysqlasked 9 years, 10 months ago Gleidso dos Santos 11 -
1
votes1
answer87
viewsFormat result with concatenated field
I need to bring from my database a TIMEDIFF with field formatted like this: 12:50 (hours and minutes). I use the following excerpt:…
-
1
votes1
answer272
viewsSearch the database with encrypted data
I own a database where the entered data is encrypted through a function written in PHP, this function encrypts and decrypts. I need to search this table. For example, I search for "BRAZIL", but in…
-
1
votes1
answer1336
viewsPerform action when closing browser
I have a system that marks if the person is available or unavailable . There is a button called get out of. If the person clicks on it when it is available, then it automatically changes the status…
-
1
votes1
answer67
viewsHow to create a system to list the most popular images from my application
I am wanting to set up a system to display the most popular images of my application. Today I list these images simply but efficiently: the folders become categories and list the images from within…
-
1
votes1
answer821
viewsUpdate with JOIN in Mysql
I am updating to table A which will receive values from Table B in accordance with a.codigo = B.folha When you run the routine below, it is slow and nothing happens for a long time. It is 500,000…
-
1
votes1
answer781
viewsHow to fill a textbox with a Mysql LIKE?
I am trying to fill in the textbox, when the client is typing the initials of his Name, select goes to the bank and tries to get the information. However, I have no idea how to send I’ll show you my…
-
1
votes1
answer592
viewsmysql - Query to convert columns into rows
I have my appointment: SELECT inscricao, assiduos_a1, assiduos_a2, max(data_inclusao) FROM cli_agendados_assiduos WHERE INSCRICAO = 10357410; Returning: inscricao assiduos_a1 assiduos_a2…
-
1
votes2
answers148
viewsHow to insert the ID in the database since it is the first field of the table?
I have auto increment ID and am having error counting columns with this code. How can I enter the ID together? #SQL Execute $uir = $pdo->prepare("INSERT INTO visitados VALUES (:IMO_CODIGO,…
-
1
votes2
answers113
viewsError adding COUNT in CONCAT
When I try to add the COUNT it returns error, but when I shoot, the script works normal. Follow the error: Invalid use of group function Script: SELECT DISTINCT TB_PRODUTOS.ID_PRODUTO, CONVERT(…
-
1
votes2
answers266
viewsInsertion in Mysql with PHP works for nothing
I am trying to create a registration page and save user data in Mysql, but it is impossible to do this. I’ve searched the Internet, but apparently my code is correct. SQL code: CREATE SCHEMA IF NOT…
-
1
votes1
answer84
viewsHow to search for records that fit into any category of a list, even if the category name only partially matches?
I have this instruction: $nova = (explode('/', implode('/', $_GET['tipo']))); Which results in this array: Array ( [0] => CONJUNTO [1] => SALA [2] => LOJA ) When I do this query in my…
-
1
votes0
answers66
viewsView data in a mysql PHP week range
I am creating a code that will show the tidal table, I have a table with the following fields: Date - Time - Tideheight It is already all filled, I need to make a query and select the data of the…
-
1
votes1
answer746
viewsInsert excel column in a table in Mysql
I have a mysql table(has 600 records): The column duvet is a column that will be extracted from an excel cell, (Mysql for Excel), doesn’t have the update option to just add and when I add the cell…
-
1
votes1
answer230
viewsHow to recover records that have been updated?
How to keep a record history when it suffers update? I have a form where it performs update data in Mysql. What I want to do is: When performing update of a record, it keeps a history of the…
-
1
votes1
answer213
viewsHow do I add an input type="radio" in a form?
How do I add an input type="radio" in a form for the result to go to other pages? And when I edit the form the radio choice is still saved?
-
1
votes2
answers1508
viewshow to select an option and update the values (price, images ...) that are in the database?
I have a system of computer budgets on the site, with several options, and I want to update the page values when selecting an option without refresh. So I searched I will need to use ajax, but I…