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
-
0
votes1
answer1251
viewsConvert PHP data to save to Mysql database
I need to receive a date using the datapicker as dd/mm/yyyy and switch to database format (mysql). have the access methods (Getter and Setter) in them applied this date function and strstring to…
-
0
votes1
answer168
viewsMysql PDO function for json
I’m taking the first steps in MySQL PDO and I have 2 doubts in my code. A first related to the efficiency of the functions. The second doubt is related to the return of results of a database to…
-
0
votes1
answer598
viewsAUTO_INCREMENT Mysql problem
I had a problem that from the ID 35218, the accounts started to be inserted from the ID 400000, but I do not remember having touched the value of AUTO_INCREMENT. What can I do to get the accounts…
-
0
votes1
answer380
viewsServices of Windows 10
Good afternoon guys, I’m having a problem with the Windows 10 SERVICE. I installed Mysql Server and Workbench to work with BD and Modeling however Mysql Server I downloaded is not compatible with…
-
0
votes0
answers187
viewsHow to view MYSQL data in Value within input
This is my PHP code: $result = mysqli_query($conn, "SELECT * FROM config WHERE id IN (1,2,3)"); $sdda = mysqli_fetch_assoc($result); This is the HTML: <div class="col-sm-12 col-lg-6"> <div…
-
0
votes1
answer456
viewsVB.NET - How to sort a Datagridview by color
I have a Datagridview, where I do a document review. Datagridview is filled by a file, I use the OpenFileDialog to select the file and fill in Datagridview. Then I call a function where a critique…
-
0
votes0
answers13
viewsAdd two ranges in a search
I need to create a query that looks for a call according to the time interval. Example: An employee opens a call in the system, but it will only be shown if it stays open for 2 to 4 hours. I’m using…
mysqlasked 6 years, 1 month ago ALAN BERTOLDO OLIVEIRA 11 -
0
votes1
answer223
views -
0
votes0
answers664
viewsHow to save a Base64 to a mysql database?
I am creating an application using Angularjs and using webservlets with mysql database connection. To generate the binary, I use the following code: $scope.adicionarArquivo = function (element) {…
-
0
votes1
answer123
viewsError in adding foreign key
I am having trouble creating a foreign key. I am doing the project in Mysql Workbench. The generated SQL script is as follows: DROP TABLE IF EXISTS `comercio`.`cliente` ; CREATE TABLE IF NOT EXISTS…
-
0
votes0
answers194
viewsAccent problem when doing mysql Dump in C# (latin1 and utf8)
I made a program in c# that dump in mysql, it is very cool, it selects the bank and does the dump alone,making a sql file on my computer, and I just need to climb the bank later to where I wish.…
-
0
votes0
answers125
viewsDelete function in PHP with mysql
I have the following line: mysqli_query($connected,"DELETE FROM itenspauta Where Coditem=$received"); But it excludes the whole row, and I just wanted to delete only one column from this table.…
-
0
votes1
answer60
viewsSimple query Mysql
Have the consultation: SELECT * FROM cliente, categoria_cliente, categoria WHERE categoria_cliente_cliente_id = cliente_id and categoria_id = categoria_cliente_categoria_id and…
-
0
votes1
answer1076
viewsHow to search for values in a PHP file with jQuery - AJAX?
Guys I want to search a string in a PHP file called search.php I want to return a string to my index.php but I want to do this when calling the function try_it(), is there any way to do this with…
-
0
votes0
answers41
viewsPHP - Showing errors while doing Ubmit.
Showing success message after changing password shows these errors. ------- This is the action used to change the password ---------- NOTE: The errors shown are related to other actions of other…
-
0
votes0
answers28
viewsI cannot count the records of a query with criteria [PHP]
[PHP] Personal, I need a help. I have a SELECT that brings all records from a table, where status column = 'offline'. I tried several ways to store the amount of records in a variable and display it…
-
0
votes1
answer24
viewsCall the date that table was created
I was watching this topical where it shows the last time the table was updated. Only I want to know when the table was created.…
mysqlasked 6 years, 1 month ago Antônio Leite 5 -
0
votes1
answer23
viewsJoin in three tables does not show all results
SELECT * FROM produto_unidades join produto_notas on produto_notas.id = produto_unidades.produtoNota_id join produto_licitacoes on produto_licitacoes.id = produto_notas.produtoLicitacoes_id where…
-
0
votes2
answers334
viewsCount items separated by semicolons in mysql table field
I have a table in the mysql database where in the field tags values are stored in this format: +-----------------+ | tags | +-----------------+ | B27;C38;H45;B27 | | C38;H45 | | B24;C45;L55;K98 |…
-
0
votes2
answers193
viewsHow to take the value of POST and save to the bank
Good afternoon friends, I’m not able to save the second INSERT in the bank, because when I save, it goes as array, how can I solve this problem? Image of the View: Picture of the Bank Code…
-
0
votes1
answer155
viewsHow not to repeat the same Input request
I need to create a page where I can choose a PLAN (or more) and a INSTALLMENT for each chosen plan. At the moment, when I choose the foreground, it is interfering with the options available to…
-
0
votes1
answer162
viewsLOAD DATA LOCAL INFILE catching 1000 first lines
I am using "LOAD DATA LOCAL INFILE" to import files txt, only that it only matters the 1,000 first lines, what I do? "LOAD DATA LOCAL INFILE 'temp_arq.txt' INTO TABLE `temp` FIELDS TERMINATED BY ';'…
mysqlasked 6 years, 1 month ago Henrique Paiva 1 -
0
votes1
answer121
viewsPHP Display only the nearest result
Good morning everyone, I didn’t know exactly how to put the title, nor how to research it. I have a if else in PHP that says that if the result is not found at first, it will try to find a similar…
-
0
votes1
answer54
viewsPHP Mysql Search result
Good afternoon I’ve been trying to fix this for two days without success and I’d like your personal help :) The tables are as follows:: Chaves` ( idChaves int(10) AUTO_INCREMENT, nomeChave varchar,…
-
0
votes1
answer412
viewsmysql select order by starting with today’s date
I have this appointment that seeks birthdays of the month: $mesHoje = date("m"); $sqlAni = $pdo->prepare('SELECT * FROM aniversario WHERE MONTH(dia) = :mesHoje ORDER BY dia ASC');…
-
0
votes1
answer32
viewsTime limit for each post
I need a solution to delete a post or a record from the database in 3 days, in case the post will be available 3 days and then will be deleted. I think to use the following line: DELETE FROM posts…
-
0
votes1
answer275
viewsRetrieve an ID and insert into Combobox for changes
What I need to do is recover the id and insert it in the combobox to change the data but the combobox is empty do not know why, if anyone can help me I appreciate. Recovers Data from Database…
-
0
votes1
answer119
viewsmysqli_fetch_assoc() - PHP
How the function works mysqli_fetch_assoc? Example, if I use it in a function like is below in PHP. What it does? function buscar_tarefas($conexao){ $sqlBusca = "SELECT * FROM tarefas"; $resultado =…
-
0
votes1
answer38
viewsPerformance at query time to database
Suppose I have a table with 100,000 records, which in this example I will call dictionary, and will have a LIMIT of 1000 results. SELECT FROM * dicionario Let’s say that hypothetically I have…
-
0
votes6
answers393
viewsIf it doesn’t work
I’m developing a website, in it some users will access and need to the password expires every 30 days. I did that check, but never falls into it, even when the if is true. If anyone has any idea…
-
0
votes1
answer305
viewsChange screen data change from the ID that is in Combobox
I am locked in the code where I cannot return all the positions of the ID of the bank in the combobox and I cannot from that ID change the other fields. Any help I thank from now on Screen of the…
-
0
votes1
answer19
viewsConsult a field with datetime year to Second format, asking to bring only today’s records?
I would like to know how to fetch a date record, but bring this dat_entrada only with the current date? Follow the query: select a1.cdg_filial Filial, a1.cdg_fornecedor Fornecedor, a2.dcr_fornecedor…
-
0
votes1
answer544
viewsHow to optimize a select within an update?
I created a stored-Procedure which updates the Drive table balances. At first I tried to use From Movimentacao within the update of the drive, only that returned error. I fixed this problem by…
-
0
votes1
answer1449
viewsEdit Image in Mysql + PHP
Hello people first ask me here on the website sorry if I end up doing something wrong. My doubt is the following, when I will make the change of the data of a product always have to put the photo in…
-
0
votes2
answers461
viewsHow to recover the `mysqli->insert_id`from within this function, in addition to the query return?
public function executar($sql){ $con = new conexao(); $con->abrir(); $re = $con->mysqli->query($sql); // Preciso retornar esta informação tambem: $last_id = $con->mysqli->insert_id;…
-
0
votes1
answer1973
viewsUse dropdown select in php mysql search autocomplete
I have this input=[text] with autocomplete that offers the title with a link (a href=) in the mysql database, but would like to create 'categories' to select the links that the autocomplete offers…
-
0
votes3
answers937
viewsHow to insert into mysql using foreach?
Hello, I have a code where I take the data coming from a webservice and store in variables. I would like to Inserir/Salvar that data in my database Mysql. However I get this data through a…
-
0
votes1
answer81
viewsSearch within MYSQL search results
I have a situation more or less equal to that: A table with the records, I need to do a search with two references, example select * from CARROS Where concessionaria= 'VW' or veiculo='VW' AND…
-
0
votes1
answer217
viewsHow to capture more than one attribute from a foreign key?
I’m doing a Java-Desktop Vehicle Rental project. I’m using MVC, DAO and JDBC. In my bank I have the tables Rental and Car: CREATE TABLE IF NOT EXISTS `frota`.`carro` ( `idcarro` INT(11) NOT NULL…
-
0
votes1
answer41
viewsReturn amount of dependents per employee
I need to select the Plate, the Employee Name and the Number of Dependents of each Employee, but the result of this query is showing the amount of dependents only for the first employee, and I need…
-
0
votes2
answers181
viewsHow to automatically generate fields
I need to go to the database to find the image and show it in each <li> </li> But I needed to make it automatic, because there are many photos, there is some way? <div…
-
0
votes1
answer220
viewserror in sending data via ajax
I’m not able to send the data to mysql via ajax, I don’t know where part of my code could be wrong. My index in which categories are listed from the database via jquery. <div…
-
0
votes1
answer60
viewsPHP - SQL Query
I’m trying to implement a code to list information from 3 tables. I want to display on the screen only the data that was registered by the user id = '20'. This value '20' I’m taking from a session…
-
0
votes0
answers94
viewsTime Out When trying to run query in Mysql
I’m running the following code: SELECT e.*, e.CO_ESCOLA, es.CO_ENTIDADE FROM enem20162 e INNER JOIN escolas es ON e.CO_ESCOLA = es.CO_ENTIDADE #WHERE CO_ENTIDADE = ORDER BY e.CO_ESCOLA; I want to…
-
0
votes2
answers1157
viewsexceeded the 'max_user_connections' Resource
I’m not sure what the reason for the error I’m having but it seems that it is something related to open connections in the bank, where error is occurring if the application tries to create more…
-
0
votes2
answers2541
viewsHow to make a select inside another select in mysql
I need to take the lowest value of a column to use it as a condition in where, but I don’t know how to do that. The column I need is the ordering, as below: SELECT p.pro_name, p.id, f.image as foto…
-
0
votes2
answers112
viewsSQL: Compare between 2 columns and return only 1
I have a table of clients that includes clients PF and PJ. In this table, if the client has CPF has no CNPJ, if CNPJ has no CPF. I need a query that checks which of the two columns is not null and…
-
0
votes1
answer197
viewsREPLACE in the IN - Mysql clause
I have the following query below, and the idea is to take the value of the @subcategories variable and put in the query’s IN: set @subcategorias = replace('10, 11, 29, 30, 31', '''', ''); SELECT…
-
0
votes1
answer461
viewsNodejs return function - Mysql query
I’m not able to return value in function, I know it’s wrong, but I’ve made several unsuccessful attempts. The query is being performed and brings the password, the problem is to return this value to…
-
0
votes1
answer238
viewsMysql Re-using subquery result
in mysql there is a way where I can re-use the result of a subquery within the main query? select (select resultado from tabela limit 1) as resultado_subquery, (resultado_subquery * outra_coluna) as…