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
answer112
viewsProblems to close communication with the database
I have some applications consuming data from the database, but for a while now the applications are not able to close the connection, when I give a conexao.close(); Java says it cannot close because…
-
0
votes3
answers245
viewsReturn a SELECT * FROM" in the Javaweb browser
Hello guys I am studying Javaweb and I came across a boring mistake!! I’ve done a lot of research on the subject but I couldn’t solve this mistake. I have this method that is pulling all data from…
-
0
votes1
answer61
viewsSort mysql search by function
I have a considerable problem: - I want to list a search for a function that does a count. I want it to be displayed at the value of notifications The counting of notifications is done from the…
-
0
votes1
answer70
viewsI can’t compare dates
Can someone tell me what’s going on in this code? The first querie works but it does not enter the condition within the for. The Second works and behaves normally, no problem with that. The case is…
-
0
votes3
answers91
viewsHelp with SQL query with COUNT in multiple rows
Hello, I’m doing the following consultation SELECT p.id, c.nome, v.titulo, count(v.titulo) FROM passageiros AS p LEFT JOIN clientes AS c ON c.id = p.id_cliente LEFT JOIN viagens AS v ON v.id =…
-
0
votes1
answer44
viewsInserting Id of a Foreign Key into a Relational Database
Good morning. I am beginner in Database and programming and have a question, which query to recover the id to insert in a table with foreign key? I am using the MYSQL database. Example, I have the…
-
0
votes0
answers271
viewsMysql has stopped working
Hello I am using Mariadb 10.2, I executed the TRUNCATE command in a table with 4 GB and Mysql stopped funionar, I can no longer access any other database, I am using Mysql in xampp and it presents…
-
0
votes2
answers82
viewsDatabase returning no value
I have the following code: $sql="SELECT * FROM imoveis WHERE (suite LIKE '%".$suites."%' OR banheiro LIKE '%".$banheiro."%' OR quarto LIKE '%".$quarto."%' OR garagem LIKE '%".$garagens."%') AND…
-
0
votes1
answer101
viewsError calling DB table
I’m a beginner in Mysql and PHP, and I want to basically list the information I have on db on a page html. I made the code and is returning these errors: Warning: mysqli_select_db() expects…
-
0
votes0
answers105
viewsDifficulty making Foreign key with two char fields in Mysql
I am unable to create a Foreign key between two tables, whose type is CHAR: ALTER TABLE hardware ADD CONSTRAINT fk_INC_LOCALIDADE FOREIGN KEY ( INC_LOCALIDADE ) REFERENCES localidade (INC); The…
-
0
votes2
answers37
viewsDo one or more searches in the database with php
I’m having trouble searching my database with the PHP code where I can search for an "item" but with more than one keyword. For example: I have a database in which I shelter key information such as…
-
0
votes1
answer1156
viewsTake the value of the <tr> the user clicked on a dynamic table
Hello... I’ve had a problem for many days and I can’t fix it. The situation is as follows: I have a table that is created dynamically from the existing data in the database: When the user hovers…
-
0
votes1
answer180
viewsIntegrity Constraint Violation in "Many to Many" create - Laravel
Context: When registering a company, by being "attached" several customers to it and that same customer can be "attached" in other companies. I have the following database structure: Model "Client":…
-
0
votes2
answers916
viewsJquery autocomplete with Ajax via PHP and Mysql
I have an input that is populated via Jquery autocomplete. Simple and efficient. But I wanted to make sure that when selecting a number of this input (it is a mobile IMEI number) it already looked…
-
0
votes1
answer151
viewsProblems with python utf8 encoding
Error I get when running the script: I get this bug by its name ~ which returns from the mysql table. If the table ~ in the name does not give error, if you put the ~ get this error. my script: #!…
-
0
votes1
answer59
viewsHow to assemble a consult to bring the latest value based on month and year?
SELECT DadosFinanceirosFiliado_Valor, Filiados_Filiado_Id, DadosFinanceirosFiliado_CompetenciaMes, DadosFinanceirosFiliado_CompetenciaAno FROM dadosfinanceirosfiliado t INNER JOIN filiados ON…
-
0
votes0
answers49
viewsDoubt about eloquent with Laravel
Eai guys, I’m setting up a management system of football clubs just to practice and in that came a question, I have the following eloquent: $matches = DB::table('ut_tickets AS TIC')…
-
0
votes0
answers186
viewsHow to change the connection to the database using Sequelize+Mysql+Express depending on the parameter sent in the request?
For example, when receiving a request parameter equal to db1, in the precise controller that uses the db1 connection string When starting the Nodejs server the configuration made in the config.json…
-
0
votes0
answers571
viewsFailed connection to database: SQLSTATE[HY000] [2002] No such file or directory
I have this error in Mysql when I try to make the connection. Everything works perfectly when run by localhost, but when running by hosting, it happens: SQLSTATE[HY000] [2002] No such file or…
-
0
votes1
answer39
viewsProblems picking up the previous Insert id
Code to insert: $codigoutente = $_POST['codigoutente']; $codvalencia = $_POST['codvalencia']; $Responsavel = $_POST['Responsavel']; $Contato = $_POST['Contato']; for…
-
0
votes3
answers323
viewsGroup by age group
Good evening, I have to group and count how many employees I have with sex and age group. Follow the html code <div class="card" style="margin-top: 5%;"> <div class="card-header…
-
0
votes3
answers96
viewsShow the user his test position
I have a table where you store test notes. Ex.: Name, Nota1, Nota2, Nota3, Course The result is this: Nome | Nota1 | Nota2 | Nota3 | Curso Pedro | 7.6 | 5.5 | 3.2 | Desenho João | 8.0 | 3.1 | 6.6 |…
-
0
votes1
answer30
viewsRegister exact time in the comic
Good morning, I’m a beginner programmer, and I’m developing a sales web app, where I need to insert in the comic the exact time of sale, but I’m not getting. Javascript code that generates real-time…
-
0
votes0
answers48
viewsError using Join and Count
Hello, the error now is that it is adding the Codsector. The values would be 6 and 3, but is coming 6 and 6. Follow photos and codes. SELECT *, COUNT(`funcionario`.`funcionario_CodSetor`) AS total…
-
0
votes2
answers83
viewsForm to change value in the database
I have it in the database I wanted a form that by clicking the button Enviar change the value of pontos user selected. But for now I only have this, I do not know how to make the code in PHP.…
-
0
votes0
answers304
viewsMysqlexception . NET Core 2.1: Unknown column 'xxxx' in 'field list'
I have a bizarre mistake I’d like to share with you. I’m using Visual Studio 2017 and creating an MVC application with NET Core 2.1, based on a Mysql database and tables that already existed before.…
-
0
votes1
answer47
viewsBring result of a sum on screen
I’m trying to create a sum and display on screen. But almost every example I see uses the call of $conn and in my case I am using a file that already brings the connection to the bank and the select…
-
0
votes2
answers130
viewsHow do I Group Text in Mysql
I’ve tried to find a solution to this case, and I need your help. I have the following table: hora data tarefa 10:00 02/01/19 A 10:00 03/01/19 B 11:00 02/01/19 C Whereas today is 02/01/2019, while…
-
0
votes1
answer324
viewsMysql trigger from one base to another
I am trying to create a Trigger in Mysql where I need in updating a table (I will call tb1) depending on the situation field, delete a record in another database from a table. Base 1 = B1 Table 1 =…
-
0
votes1
answer66
viewsMysql query returning empty
I made the following selection $selficha = mysqli_query($conexao,"SELECT * FROM ficha WHERE nome='$user->username'"); $ficha = mysqli_fetch_row($selficha); When I want to get a table result ficha…
-
0
votes1
answer50
viewsProblem sending a file by POST
The following code that I present to you right below is to upload a file ". CSV" and send the data to Mysql, but the post method is not sending anything to the function . PHP, and I get the message…
-
0
votes2
answers49
viewsHow to simplify this Consultation?
Have the following Question below and I would like to know if there is a way to simplify the WHERE clause SELECT idMembro, dataCadastro, nome, apelido, dataNascimento, telefone, celular, bairro,…
-
0
votes1
answer79
viewsJSON accessing two databases
I have two darlings: SELECT Data, NomeDis, AlunID FROM FaltaDupla ORDER BY Data, NomeDis, AlunID SELECT lNum FROM Aula WHERE lDisciplina = AND lData = Derived from a Delphi function. The first is…
-
0
votes1
answer27
viewsrecovering array with PDO
I have a problem that I’ve been through before but I can’t remember how I solved it. The goal is to compare two tables of the database and return only the corresponding values between the two, in my…
-
0
votes1
answer53
viewsDoubt how to mount a query in Mysql
SELECT `tab_banco`.`nome` AS `bancoNome`, `conta_bancaria`.`conta_apelido` AS `contaApelido`, `conta_bancaria`.`id` AS `idConta`, `movimento`.`conta_bancaria_id` AS `conta_bancaria_id`,…
-
0
votes1
answer93
viewsProblem saving mysql decimal field
Out of nowhere began a problem I found no explanation. Follow my code, explaining the problem. Here I receive the data: $venda = $_POST['f_venda']; //Sim $preco_venda = $_POST['f_preco_venda'];…
-
0
votes2
answers2270
viewsProblems with special characters á, ç, à, etc with php/mysql
Hello, I’m performing a get of files from the database to a page in order to be a search bar, but all results obtained are not accepting special characters, such as: ç, á, è. ex: LEGISLATION O APLIC…
-
0
votes1
answer84
viewsProcedures MYSQL - Pass parameters or not
I created a procedure to make the following process: If you do not enter the required parameter, you will bring the complete list of what I want (in this case a list of students etc). If you type,…
-
0
votes1
answer91
viewsOpen Mysql data on another page
I started working on Mysql a little while ago and I have a little problem and I don’t know how to fix it. If anyone can help me I appreciate it. I have a book site that shows the photo of the book…
-
0
votes1
answer138
viewsCreate a menu with categories
I am developing a project in PHP and Mysql, and would like to create a menu that shows the categories registered in a database. In this case I have two related tables whose names are tbl_categorias…
-
0
votes1
answer102
viewsMysql order by hour
In Mysql I have the following table: 2018-06-28 12:10:26 2018-06-25 11:10:26 2018-06-21 14:10:26 2018-06-31 00:10:26 2018-07-28 01:10:26 2018-07-29 09:10:26 Are the login days of each user (have the…
-
0
votes1
answer672
viewsI can’t open project in Laravel
I have a project in Laravel that after I formatted the computer I can no longer open it. The following steps have been performed: Installation of XAMPP and change the default path to the project…
-
0
votes2
answers51
viewsdoubts in the elaboration of code
I was unable to get this code to return a message stating that it did not locate the requested data, I need to fix it and the other doubt is that even without putting anything in the search field if…
-
0
votes1
answer45
viewsProblem with update in Trigger
I can not update the table due to Trigger the goal of it is to store the information of the changed record, so I wanted to know if the problem is in Foreign key(FK), if in that case I would have to…
-
0
votes1
answer46
viewsHow to "raise" classes in the bank using also confirm javascript
Hello, I have the following code and I need to pick up a student’s class at the bank and if yes to confirm in JS: "climb" your class. Ex: The student is 1A, I press the button to go up and he needs…
-
0
votes1
answer34
viewsReturn last result (updated by date) of each attribute
I have a database with a table called config. In it I have the columns atributo, valor and data: atributo valor data_atualizacao juros_composto | 5 | 2019-01-25 juros_fixo | 6 | 2019-01-27…
-
0
votes1
answer98
viewsProblem with accentuated character in the return of the query
I have a Mysql database with encoding defined as latin1_swedish_ci. I’m using Dapper to connect the database. When I make a query to certain tables, the characters that are accented comes as follows…
-
0
votes2
answers307
viewsMysql - Query in related tables
The scenario is simple, SQL displays all the criteria results and there is a filter to select multi values that will be passed to SQL, which should refer to tbl2 in the field tbl2_criterio, and thus…
-
0
votes0
answers45
viewsRetrieve a flag in a function
I have a function in a php script where, in it, I must recover the values 1 or 3 of a table in mysql (1 - documents relevant to service providers, 2 -documents of the contracts (companies) for which…
-
0
votes1
answer535
viewsSearch records between two dates using the eloquent of the Standard
I need to search the bank records between two dates. example: $emprestimos_material_qtd = MultimeiosDetalheEmprestimo:: where('recursoId', 2) ->where('dataDevolucao', null)…