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
answer435
viewsI close the connection, and can no longer connect Nodejs Mysql
I need to close the connections after the query return success or error, the first time I do the query ok, but then it closes and no longer queries... I have tried to close in several parts of the…
-
0
votes1
answer699
viewsConfigure Mysql in Docker container
When I take an SQL file of about 80 Mb and try to dump it in Mysql Workbench He gives: Error Code: 2006. Mysql server has Gone away My Docker-Compose configuration looks like this: version: "3.3"…
-
0
votes1
answer115
viewsHow to make an auto complete in the Standard
<input class="typeahead form-control" style="margin:0px auto;width:200px;" type="text"> </div> <script type="text/javascript"> var path =…
-
0
votes0
answers224
viewsPopular selects with php, jquery and mysql
Good afternoon, colleagues I am with a doubt that for a long time I have been trying to solve and I can not get that is popular 4 selects using php, mysql, ajax and jquery. Searching for answers on…
-
0
votes1
answer206
viewsHow to join multiple select Count(*) in mysql
I have a table called tb.teste which has 4 columns: status, categoria, mêsand tier. And in each column, accept the following values: status (novo, usado, pós venda) categoria (venda, não venda,…
mysqlasked 5 years, 7 months ago Alisson Oliveira 11 -
0
votes1
answer46
views -
0
votes1
answer114
viewsPython and Mysql tuple search
Hello, Good Night!!! I am new to Python programming, and recently I received a job in college to implement a program similar to Akinator, using the desired language, because it is easier, I decided…
-
0
votes0
answers271
viewsUsing Count(*) as a table filter
Good morning, I’m breaking my head with the following code: select ac.cd_agenda as "Código Agenda", m.nm_pessoa_fisica as "Médico", esp.ds_especialidade as "Especialidade", a.ds_complemento as…
-
0
votes1
answer36
viewsMysql characters
I am with a registration system in one of the fields I insert an html code: <iframe…
-
0
votes1
answer235
viewsError using Mysql Sequelize
Code to establish connection to the database: const Sequelize = require('sequelize') // Conexão com o banco de dados MySQL const sequelize = new Sequelize('postagens', 'root', 'mafikgod123@', {…
-
0
votes0
answers64
viewsDelete $_Session when logging out of browser
Hey, guys, I’m making a panel of queries with Sesssions systems. I have a little doubt about him... How can I detect if the user has closed the browser? I already tried UNLOAD(); however it detects…
-
0
votes1
answer1055
viewsDelete data with regards Many to Many in Laravel
I’m having a problem deleting associated data in Laravel. I have user tables, records and tags. As you can see the table users connects with records, while a pivot table (registro_has_tags) connects…
-
0
votes1
answer244
viewsStoring input data in mysql + Javascript
I’m trying to store the input data below with javascript but the same is not storing: usuers.html file <input type="text" name="nome" id="nome"> <input type="text" name="email"…
-
0
votes0
answers213
views#1215 - You cannot add a foreign key constraint
Good night, I can’t figure out why error #1215. I’m a few hours away and still can’t figure it out. Can anyone help me? Thanks! CREATE TABLE IF NOT EXISTS `imovelweb`.`cadastro` ( `id_cadastro` INT…
-
0
votes1
answer454
viewsERROR: Object of class mysqli_result could not be converted to int
Hello! I am developing a site to buy a game that has a page to record the information of each purchase, among them, the amount of games purchased. I wanted that, during the saving of the…
-
0
votes1
answer56
viewsQuery SQL does not work correctly
Good Afternoon, I’m trying to pull existing hour intervals on my bench. I’ll post the codes to be more explanatory Query: $user = "Diego"; $pack = "0013-001 B515 MCA ENGINEERING SUPPORT SYSTEM";…
-
0
votes1
answer401
viewsReturn the last ID with PDO in PHP
I need to get the last id inserted, I tried using lasInsertId but I’m not getting it, I don’t know if I ran wrong or so on, but here’s the code of my connection and PDO functions. The error remains…
-
0
votes1
answer94
viewsHow popular are multiple <select> "with distinct results" in a single app.get() route?
Still beginner in Nodejs and working with Express, Handlebars and Mysql. In a form - which in the future will be a register, this has among other inputs, two <select> any, one must be filled…
-
0
votes1
answer35
viewsProblem sorting data resulting from Inner Join
Guys, I have a basic question but I’m having a huge difficulty in making an appointment. I have a protocol system in which protocol data is recorded in a table called PROTOCOL and the updates of…
-
0
votes1
answer54
viewsHow to search for id separated by "," correctly?
I have a table called attendance, within it I have a field called forwarding, in the forwarding field I save the ID of the "routing types" I have registered in the table cad_forwarding separated by…
-
0
votes1
answer47
viewsConsult data in three tables where only two are related
Good afternoon, I will try to explain a situation where I am, I have 3 tables(A,B,C) where A and B are directly related, B and C are also related. I need to get the value of a field in table C where…
-
0
votes1
answer35
viewsCertain user redirect themselves to a particular page
Good evening I have a doubt I’m trying to make a database user in this case is the adm that if I log in with the adm i go to a specific page, in this case a backoffice; only that I’m not getting.…
-
0
votes1
answer36
viewsMysql with . Net 4.6.2 - Error "Object reference not set for an instance of an object." dbContext class
Dear friends! I have a problem trying to access dbContext with Mysql, for example accessing Context.set(). Add(obj), I get the error message "Object reference not set for an object instance." the…
-
0
votes1
answer36
viewsIncorrect grouping of lines
Hello someone can help me, I’m trying to bring a company report and activity made in 12 months, a company and an activity was made during 12 months and I want to know each activity if it was made in…
-
0
votes3
answers216
viewsInsert a form with while
ola i have this form that multiplies according to the app registration for the user, . see the result graphically, how do I enter into the database where I can have a user with up to 7 distinct…
-
0
votes1
answer22
viewsCreation of Trigger to help add a field according to an operation
Good colleagues. I have the following problem, I need when a loan insertion action is triggered to the table emp_emprestimo automatically update to the table called genero_frequencia_emprestimos…
-
0
votes1
answer133
viewsFetch not returning anything [PDO::FETCH_ASSOC]
Connectionclass <?php abstract class ConnectionClass { protected function conecta(){ $dsn = "mysql:host=localhost; dbname = coletase"; $user = 'root'; $pass = ''; try{ $connectionPDO = new…
-
0
votes0
answers161
viewsIs it possible to execute 2(delete,Insert) commands in a Stored Procedure - MYSQL?
Falling into the condition of if I need to execute these two commands: if(ultima_refeicao!=refeicao) then SELECT refeicao_alimentos.calorias into calorias from refeicao_alimentos where…
-
0
votes0
answers43
viewsHow to show only records with an associated character or letter to limit the search?
The code below shows the records that include the initial number that was entered up to the limit of 5 (1, 11, 19, 107, 115...). Since the field to be searched has articles numbered with the word…
-
0
votes0
answers43
viewsHow to turn values from an array into PHP variables for BD query?
I am in dire need of any help from you with a little problem in PHP/Mysql. I have a variable that has the names of medicines separated by commas (string), the amount of names stored in this variable…
-
0
votes0
answers35
viewsPerform two consecutive and dependent Mysql inserts with Node JS
Good Morning Everyone. I have a problem and I need your help. My case is as follows: I have a TASK table and a DIAS_TAREFA table that has a foreign key for id_task. Therefore, after storing the data…
-
0
votes1
answer102
viewsHow to create a select in the database that runs two tables with a single primary key?
I’m new to programming and I’m developing a note system. The case is as follows: There is a form that registers the notes, where it uses 2 tables of mysql, the notes table (where the code of the…
-
0
votes2
answers65
viewsComparison of PHP and MYSQL dates
I’m having problems with a code, as I’m new in the area I’m developing just to learn. What I want to do: Perform a monthly access control of the user, that is, if it is not paid the monthly fee it…
-
0
votes1
answer548
viewsHow do ORDER BY DESC work in Mysql?
I am trying to make a query on my table using OREDER BY DESC, even using the correct syntax I get the error: "You have an error in your SQL syntax; check the manual that Corresponds to your Mysql…
-
0
votes1
answer62
viewsHow do I present in a list on the same row of a groupBy table?
I’m developing a listing and I’m having a hard time presenting on the same row of the table data groupBy I’m not able to list this data on the same line, in case DT_PONTO returns two values S for…
-
0
votes1
answer88
viewscapture duplicity error in mysql with java
I’m trying to show a message that there is already a registered id, but it falls in the catch that shows: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry…
-
0
votes1
answer132
viewsData synchronization, mysql and Promise
I’m a beginner in Node.js and I’m trying to understand why I can’t bring the expected result of my API. I have an application that sends an array of data to an API on Node to be saved to the…
-
0
votes1
answer46
viewsCount column data and reset after Cpf exchange
I have the following columns in the table eventos (nome_hosp,cpf_hosp,parametro_evento, data). What I need to do is, where the column value parametro_evento = 1, perform a line count by separating…
-
0
votes1
answer190
viewsPostgres/Mysql Changing the data of a repeating field
Good morning I have the "areas" table, In it I have the column "f_name" I want to transform the "f_name" column to Unique id. However, there are repeated data currently. I need an Sql command where…
-
0
votes0
answers176
viewsLoad listview with data
I have a form that searches all the bills registered in the system for the client code that was registered. When you find it, list all the notes in the listview. I was able to get him to look for…
-
0
votes2
answers76
viewsPHP+MYSQL file filter
Good afternoon this is my first post here, so I apologize if I’m repeating a question, let’s go to error have a registration application that I’m trying to implement file upload,below follows the…
-
0
votes1
answer57
viewsSelect MAX(ID) does not work correctly
Can anyone tell me why this SELECT down in the MYSQL is getting the biggest ID correctly, but the fields (value, date and status) do not bring the information of the largest ID returned. The SELECT…
-
0
votes0
answers90
viewsMysql - Select tuple values using dynamic column names
It is a filter where the user selects the days of the week and sends to the bank to filter but I am not able to perform the filtering. The table has as column the days of the week with several…
-
0
votes0
answers411
viewsQuery with like and or with PHP variable
I have a form with two inputs one type text and one type date. I am trying to make a query where the result should be filtered either by name field or by birth date field or by two together. It…
-
0
votes0
answers22
viewsSyntax error, Mysql trigger executed by php
Could someone please tell me where I’m going wrong with my Rigger’s creation Trigger $sql = "DELIMITER $$ CREATE TRIGGER produtos_movto_insert AFTER INSERT ON produtos_movto FOR EACH ROW BEGIN IF…
-
0
votes2
answers104
viewsConvert BD to utf8
I have a mysql database which is from a very old project (~2009). The accents saved in it are this way: Beginning = Beginning Location = Location§ Photo album = Albumen of photos In the SQL file, it…
-
0
votes0
answers113
viewsError trying to add a double column in mysqli
I need to add some columns to my mysqli that according to the wamp is the version 5.7.26 because I am doing the integration with paid market, however, I realize that regardless of the way I create…
-
0
votes1
answer79
viewsAdd data from database
I am using this function to search for a field in a table: function rendimentoDia($conexao, $dia) { $rendimentos = array(); $resultado = mysqli_query($conexao, "select valor from hospedes where dia…
-
0
votes2
answers125
viewsMysql load the last purchase of each item
I can a list of technical sheets of some products where I need to make the cost calculation taking into account only the last purchases made of each item of a technical sheet. For example, to make a…
mysqlasked 5 years, 6 months ago celsomtrindade 8,038 -
0
votes1
answer121
viewsColumn with utf-8 character error
When executing: SELECT campus_nome FROM cursosprounine where campus_nome like ('%?%')group by campus_nome; to check the character error, I found a code that taught me to convert the column: UPDATE…