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
votes1
answer43
viewsShow records, via PHP and Mysql query, in two tables, with GROUP BY
Good evening... I have the following doubts This system aims to bring users from a particular region or workplaces that belonged to a particular city. If we search for city=4261, according to the…
-
-1
votes2
answers83
viewsHow to make a CASE WHEN for named expressions?
Good morning! I’m having trouble making one CASE WHEN of a named expression. I have a SELECT in which one of the parameters has a named expression. Example:…
-
-1
votes1
answer44
viewsI need to mount a query with Mysql through Laravel (Eloquent)
I have to get data from 3 tables(planejamento_objetivo, planejamento and equipe) and then apply a period filter and team. Assemble query to bring up table data planejamento_objetivo. It will only…
-
-1
votes1
answer47
viewsView data from fetch array in modal - PHP
I’m making a task application with database, in which data is stored in a mysqli_fetch_array and listed in a loop while. When I click on a expand button, which has in the task structure (code…
-
-1
votes1
answer70
viewsCan someone give a hand with my Paging code with php PDO
Hello good morning, someone could help me with this paging code with php and PDO it works normally but only gives me the option to go to the first page and the last. I can’t get to the next page or…
-
-1
votes2
answers20
viewsGrouping datatime in selects and summing the elements of the search per day to perform a comparison of the days of a given month
I’m using the type datatime and trying to perform a select that counts emissions day-to-day to mount a comparison chart of the days of a given month. However, when grouping the dates it is returning…
-
-1
votes1
answer34
viewsProblems with no screen refresh queries
Friends, I am trying to do a database search and present the result on the screen without updating the page, however when typing in the input no message is displayed. The user would start typing a…
-
-1
votes1
answer61
viewsSQL code problem in the @Query java annotation
I am trying to perform a command through Inner Join in an annotation @Query in Java, but an error occurs. The code usually works when performing an SQL query without using Inner Join. It follows the…
-
-1
votes2
answers56
viewsHow to ignore a query line in the database?
I am trying to develop a code to create dynamic tables with php and mysql, using an Asterisk database. My first difficulty is that the recording of calls are duplicated (or quadrupled), if the…
-
-1
votes1
answer43
viewsReuse mysql connection function where
Hello! Analyzing my source code I realized that within the project there is a part that repeats many times. I would like to reuse repetitive code in my mysql project const pool =…
-
-1
votes1
answer38
viewshow it returns an array of a function
I want to take data from a SELECT array public function aluno($cod) { $cod = ""; global $pdo; $sql = $pdo->prepare("SELECT KS0042.CODALUNO, ks0300.ALUNO From KS0042 Inner Join KS0300 ON…
-
-1
votes1
answer43
viewsPHP: How to check if there is a field in the table, and if it does not exist, add
<?php $servername = "servername "; $database = "database "; $username = "username "; $password = "password "; $conn = new…
-
-1
votes1
answer38
viewsInsert Multiple Data from a Dynamic Form into MYSQL
I don’t have much knowledge in PHP and I have a form where the user has some fields to fill and write in the SQL database, and a field of this form will be dynamic where the user can add as many…
-
-1
votes1
answer22
viewsI need to list 3 tables in the Standard, somebody help!!! I tried it anyway!
I have 3 tables Sales ID | TITULO Brokers ID | NOME Relas - "Make the relationship between the tables" ID | VENDAS_ID | CORRETORES_ID | TIPO I need the table relas make the relationship between the…
-
-1
votes1
answer73
viewsReturn on screen a database information with Python
I have the following code: # Lista dos produtos produtos = {'1':('Dipirona 500mg 10 cp', 2.99), '2':('Paracetamol 500mg 10 cp', 4.7), '3':('Ibuprofeno 600 mg 4 cp ', 5.98), '4':('Dorflex 10 cp',…
-
-1
votes1
answer32
viewsI wanted to know how to pass a record of an array from one php page to another and then to an sql table
I would like to know how to pass a record of the array of a php page to another php page that will then give an Insert in the corresponding table in the database, I am beginner in php and have tried…
-
-1
votes1
answer21
viewsDuplicate results
I have two tables product:{ pid namesake value category stock Eston stocking } pictures{ fid name product } And I’m trying to make a query in the bank where I need to take everything that is in the…
-
-1
votes1
answer73
viewsHow to make the Qt designer lineEdit receive an integer or float with Python
I would like to know how to make a lineEdit of Qt designer receive a value of type integer or float and armezene that value received in a variable, because, I need to do mathematical operations with…
-
-1
votes1
answer26
viewsHelp with method to add new item
Good afternoon I have this sales screen: As you can see I selected a product, set the quantity and the values were set automatically. Now my idea is, to add a new item, with the same fields,…
-
-1
votes2
answers55
viewsLogin php always returning empty
I am making an application and I have the following problem: I register a user, it shows in the database, when trying to login, even filling the fields correctly, the SESSION['em_white'] always…
-
-1
votes1
answer117
viewsPHP Update - Real-time CHART JS
Problem: I need to do a real-time refresh Chart.js chart, but for that I’m having to update the data coming from the database with a refresh button, I need that as soon as the page loads the data…
-
-1
votes1
answer180
viewsPython with MYSQL - ERROR: 'Nonetype' Object is not subscriptable
I am trying to practice creating a small program with LOGIN SCREEN. This program has access to a MYSQL database and I want to VALIDATE the login data to allow entry. I’m trying to learn on my own…
-
-1
votes1
answer70
viewsDouble quotes when exporting files
Can you ask me a question regarding the export of files in Mysql? , I have already given a search on but found no answer... Next, I have a table that stores the NAME of some clients, I need to put…
-
-1
votes1
answer18
viewsHow can I count the number of Records in Mysql?
I have this Mysql code: SELECT COUNT( PEDIDO.COD_PEDIDO ) FROM PEDIDO JOIN PEDIDO P2 ON P2.COD_CLIENTE = PEDIDO.COD_CLIENTE AND DATE( PEDIDO.DT_PEDIDO ) = DATE( P2.DT_PEDIDO ) AND PEDIDO.COD_PEDIDO…
-
-1
votes1
answer36
viewsHow to compare two fields (stock and minimum) of the same Table in (Mysql) using C#?
Thank you from now on, Using Visual Studio and Mysql: I need to display in my GRID a list of products that only where the 'stock' field is smaller than the 'minimum' field of my Products Table'. I…
-
-1
votes1
answer37
viewsMysql connection within a class
Hello, I’m having a hard time making a connection to the database. To make the connection I created a class called Conexao and I am using PDO, when I need to make a select, for example, I call the…
-
-1
votes1
answer19
viewsIncorrect data being entered in the list widget
After a lot of trying, I managed to make my program that is a box simulator (commercial automation) the possibility to multiply the items (instead of the box register one by one, when it is of the…
-
-1
votes1
answer58
viewsMysql 8.0 Database Registry with PHP 8.0.5
Fala galera! I am a beginner in PHP and am unable to insert data into my Mysql database. Just follow my code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta…
-
-1
votes1
answer27
viewsSend files to Mysql in Blob
good morning. Does anyone know how to send exe and csv files to Mysql using Delphi? I didn’t find much in it. I need to save CSV files in the table but when I import by the test below the file size…
-
-1
votes2
answers52
viewsDelete all items that have at least one Null value
I am needing to do a query that DOES NOT return the Ids of contracts that have ANY installments like Null, in the example below I need it to return empty, because the ID contract 666666 has at least…
-
-1
votes1
answer25
viewsHow to Join with 3 tables in Mysql
I have 3 tables in my database, which are: Table user: id name 1 User 1 2 User 2 Table pack: id name id_user 1 Package 1 1 2 Package 2 1 id_user is the foreign key of the table with reference to the…
-
-1
votes1
answer40
viewsHow to group the records by year?
How would I group the years that are equal? in my table there is a record with the year 2019, one with 2020, and 3 with 2021, but in time to show the result the records that are with the year 2021…
-
-1
votes1
answer39
viewsHow to delete strange character in page header
Strangely a character began to appear in the <body> of a page I’m developing causing a blank line in the layout, stranger still, so I was able to identify is that if I remove the connection to…
-
-1
votes2
answers66
viewsHow to limit the number of SQL lines according to a variable?
I have an SQL query in PHP to get the information according to the line number of a file entered by the user. I need to take this number of rows of a variable and replace it with the variable in…
-
-1
votes1
answer54
viewsDoes php mail send emails in the background?
I’m developing a system where I send email to several users, where it sends the email and changes the SEND column in the data stack to true with a range of 10 seconds between each shipment. So I…
-
-1
votes1
answer45
viewsInsert INTO mysql and python error
When I try to make an INSERT INTO in my SQL code, it gives the same error mysql.connector.errors.DataError: 1292 (22007): Incorrect date value: '1998' for column 'validade' at row 1 This is my…
-
-1
votes1
answer30
viewsQuery in different columns at the same time in Mysql
I have two tables, the first doesn’t matter for now, the second follows example below and we will name from table2: id column1 column2 1 valor1 value2 2 value2 valor1 3 Valor3 value4 4 value5 value6…
-
-1
votes1
answer45
viewsHow to return a message to the Fronteend after checking an API in Reactjs
I am making a registration form in Nextjs, working ok, the inputs takes the user input data via reactJS FETCH API and sends to a MYSQL database, Until here ok, what I’m cracking my head is time to…
-
-1
votes1
answer42
viewsUpdate with subconsultation and Inner Join - Mysql
Tables Contract id, contract, credit_id, debtor, evento_id, campanha_id Title id, contrato_id, title, maturity, value The idea is to update the field campanha_id of contracts using a sub-allotment…
-
-1
votes1
answer28
viewsExclusion of related tables
Good morning, I am trying to delete my user class but am having the following error "Cannot delete or update a Parent Row: a Foreign key Constraint fails (pitangdb.phone, CONSTRAINT…
-
-1
votes1
answer92
viewsSpecific join between tables
I have two tables customers id razao_social 1 company_1 2 company_2 and tasks id id_client tasks competency 1 1 '101' '032021' 2 1 '102' '032021' 3 2 '101' '032021' When I make one join between…
-
-1
votes1
answer32
viewsHow to Scrap a Table and insert the data into the database?
Well, basically what I need is to do a microservice that extracts the prices from the soybean quotation from this table: https://www.canalrural.com.br/cotacao/soja/. And then insert the data into a…
-
-1
votes0
answers26
viewsCopy a database record with PHP
I have a database with a table called products, in this table I have 3 columns: name category url With the code below I can copy all the data of an existing product to a new product. $id = 33; $sql…
-
-1
votes0
answers24
viewsUpdate Mysql Java Problem | Error: Exception in thread "AWT-Eventqueue-0" java.lang.Nullpointerexception
Hello, I am Java developer, I am developing a program with mysql and java swing. And in my update code, is showing the following error: Exception in thread "AWT-Eventqueue-0"…
-
-1
votes1
answer30
viewsMysql - Count equal data in the same column
Good afternoon to all, I have a table called 'ms_msg_log'. In this table, I have the columns 'id_error' and 'data_alt'. I need the data displayed as follows: id_error = the normal value of the…
-
-1
votes1
answer27
viewsDoubt with relation of tables - Modeling
Next guys, to with 3 tables here, I’m in doubt how to relate them. I am studying relationship tables here... This project is a stock system, and has no intention, except to practice and study! My…
-
-1
votes0
answers11
viewsHow to activate line breaking in Workbench word wrap .?
I want to enter the data c INSERT INTO `cursos` VALUES (1,'HTML5','Curso de HTML5',40,37,2014),(2,'Algoritmos','Lógica de Programação',20,15,2014),(3,'Photoshop5','Dicas de Photoshop…
-
-1
votes0
answers29
viewsSQL, as always bring a value in a query even though the query is null
I have the following select, in it I bring the point of operation on day 1, and the subquery brings the point of dia2. SELECT id_Ponto, (SELECT id_Ponto FROM ponto WHERE cancelado = false AND…
-
-1
votes1
answer45
viewsHelp with Select adding up accounts to pay and receive fields for MYSQL reporting
I have two tables equal fields, ACCOUNTS TO PAY and ACCOUNTS TO RECEIVE, I need to generate a report taking the value Credit - Debit and leaving result, someone can help me, I’m picking for this,…
-
-1
votes1
answer30
viewsTrigger to devalue apartment price if garage linked to it is excluded
I need to create a Rigger that devalues the value of the apartment when a garage linked to it is deleted, I have the following tables: create table apartamento ( numero varchar(5) not null, tipo…