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
answer20
viewsUnknown column in 4 tables INNER JOIN
I’m making a INNER JOIN with 4 tables, where the table itens_venda receives the key to funcionario, cliente and produto. But the mistake Error Code: 1054. Unknown column 'itens_venda.cd_itens_venda'…
mysqlasked 4 years, 9 months ago Márcio Pimentel 41 -
0
votes0
answers24
viewsUnion of more than one table
In my database there are two tables: cde_usuario cde_venda_detail I will begin to introduce a part of Notifications system. The record must have some column indicating whether the notification has…
-
0
votes3
answers101
viewsDetermine when Loop WHILE should stop PHP
I have the following problem, I have a system in PHP that makes a WHILE in a column of the database that contains certain values and I need WHILE to stop at a value that I determine. The first…
-
0
votes1
answer92
viewsSelect Lotofácil games that must contain dozens of specific
I have a Mysql Database containing all combinations of Lotofácil, exemplified below: I am trying to recover, for example, the games that contain the tens 11, 17 and 21, obligatorily in the same…
-
0
votes1
answer53
viewsUnwanted automatic insertion occurs every time the page is updated in PHP form
My code has a very strange behavior to perform insertion of unsolicited data from previous data every time the page is updated. Can anyone tell me why? Screen output (Every time the page is updated…
-
0
votes1
answer44
viewsOperationcompleted had already been called in the operation and other calls are illegal. Background Worker
I’m developing an application where I came across a mistake I’ve been consulting, but I couldn’t understand exactly how to fix it. In short: I created a form that opens as Dialog and gives me the…
-
0
votes0
answers19
viewsSelecting records for reporting according to month and year
I wish to select the records according to the month and year for the report. Where it will dynamically collect the records of the last months and will be shown in the sum. $ cobrancas = DB :: table…
-
0
votes0
answers38
viewsQuery mysql INSERT returns nothing, even after
I recently started using Ode and I’m kind of having a little problem. I’m trying to insert a product into my "products" table but I didn’t put auto-increment in its ID, so to save the right ID I’m…
-
0
votes2
answers55
viewsEven without giving errors, the information is not saved in the database
I am trying to create a registration system using classes, my code does not appear any error, however still information is not saved in the database. I could not find the problem, in case someone…
-
0
votes1
answer118
viewsTypeerror: fetchall() takes in Arguments (1 Given)
When running the code below I get the title error, I tried to use a different code structure by assigning the results of select to a ma variable, tried tbm just bring a bank line with fetchone() and…
-
0
votes1
answer141
viewsHow to reference multiple foreign keys in a MYSQL field
I have a problem that I can not find a solution, I am making a database for a school system, in this system there is the table of materials, which has an ID and a NAME, and teachers who have an ID a…
-
0
votes0
answers18
views"WITH" is not valid at this position for this version of the server. Deploy to Heroku
I’m making a Deploy on Heroku of a personal project developed in PHP in which it is almost finished, however, I am having this error with a query of my project that is not running on the server, but…
-
0
votes3
answers781
viewsHow to view the data of the last saved record in the database
how do I display in the view only the data of the last saved record in the database? I can display all the data by calling the All() method in the control, and the good old foreach in the view to…
-
0
votes2
answers137
viewsIssue advanced MYSQL queries
So, I have a question, how to make a query related between 3 tables, being: Tabela 1: Nome: tb_os Campos: id_os, id_cliente, valor_os Tabela 2: Nome: tb_clientes Campos: id_cliente,…
-
0
votes1
answer77
viewsIs my SQL code okay?
I’m learning SQL, and my teacher gave me an activity, I did it, but he gave me 1 grade. I want to know if the code is right. CREATE DATABASE escola; USE escola; CREATE TABLE aluno ( codigo INT…
-
0
votes1
answer54
viewsMap data like Mysql TIME to JAVA above 24 hours Example (37:26:30)
I have a system that I need to bring Mysql database time information above 24 hours to Java. We use Ibernate and it’s like this; In the bank the data is as TIME (37:13:36) example: TEMPO_REPOUSO…
-
0
votes0
answers112
viewsRegister Mariadb External Database Products on Woocommerce
Regards. The local system uses the database Mariadb, we know that there is Rest API Woocommerce, the question is whether there is a way to interconnect the databases Mariadb with Mysql Woocommerce…
-
0
votes1
answer39
viewsError inserting data in mysql and php
I’m kind of a beginner dealing with php and would like some help to understand why this is happening I am having the following problem, when I run the following php Function, it does not return…
-
0
votes1
answer28
viewsCalculate column
I want to calculate the column Rounds automatically, to get the last 10 games of the team understood? do not manage to do this with SELECT, I think it has to be in the creation of the table... This…
-
0
votes2
answers747
viewsHandlebars: Access has been denied to resolve the Property "title" because it is not an "Own Property" of its Parent
I’m having a problem with displaying mysql data by handlebars: Executing (default): SELECT `id`, `titulo`, `conteudo`, `createdAt`, `updatedAt` FROM `postagens` AS `postagens`; Handlebars: Access…
-
0
votes1
answer288
viewsMysql: How to find string from a given character?
I’m developing a small system - and I’m not an expert on Mysql (so the doubt may be silly) I receive from the client a giant string with 580 characters - this string contains a series of information…
-
0
votes1
answer184
viewsINNER JOIN of tables does not appear the values of their columns
I’m making a INNER JOIN that joins the columns: cd_devolucao table devolucao cd_itens_venda table itens_venda cd_produto table produto valor_total table itens_venda I’m wanting to do the INNER JOIN…
mysqlasked 4 years, 8 months ago user198162 -
0
votes0
answers54
viewsRequest/query capability using PHP + Mysql
Hello, I am developing a project and I lack some theoretical and practical knowledge about the operational, requirements and responsiveness of PHP + Mysql. I am creating the project API initially in…
-
0
votes2
answers205
viewsChanging the value of a variable when selecting an option
In my product table, I would like to make some basic filters, such as sort by alphabetical order, price, etc... The idea is as follows, when the user selects a option (does not necessarily need to…
-
0
votes1
answer56
viewsStored procedures in mysql do not validate type?
I have a stored file in my mysql that is in simple, it selects a table and filters by an id. Follow the store: create definer procedure fn_get_client_data(IN _email varchar(100), IN _id_loja int)…
-
0
votes1
answer41
viewsSelect in mysql grouping result by month
Well I have the following table structure: Categoria | DataOp | Tipo | ValorOp -------------------------------------------------- Carro | 2012-01-14 | 1 | 10 Moto | 2012-01-17 | 1 | 200 Venda |…
mysqlasked 4 years, 8 months ago Hugo Borges 5,294 -
0
votes1
answer35
viewsOptimize querie that returns the set of records of multiple tables
I have custom to use the following querie structure to return the amount of table records from my mysql database: SELECT (SELECT COUNT(tab1_codigo) FROM tabela1 where alguma coisa) AS total1,…
-
0
votes1
answer211
viewsQuery in Sequelize separating Month and Year
Hi, guys. Sorry if my question seems a bit silly, but I’m starting now and doing this query is tying my head in a knot kkk Next, I’m building a system to manage the company’s vouchers (advances). I…
-
0
votes0
answers154
viewsWhat is the recommendation for the Mysql Connection Pool in Nodejs?
According to the documentation of mysql for Nodejs, it is possible to configure a connection pool to limit the number of connections in Mysql When running the following command on my Mysql server:…
-
0
votes2
answers58
viewsError when registering.php with mysql (final step) "INSERT"
follows below the code of the register that I made. In thesis it is working perfectly, but at the end of the moment it is to give the INSERT, it ends up falling in LSE (ie, the registration was…
-
0
votes1
answer383
viewsData formatting in Node.JS, with Sequelize and Moment.JS
I would like to format a date that is being loaded from the database with Sequelize. I’m blogging and I need to get the article creation date My route: app.get("/", (req,res) =>{…
-
0
votes1
answer54
viewsStarting in POO (PHP) and I have the following question;
I’ve been searching for information for a long time to unravel the mysteries of POO (PHP) and I can’t find them. I would like to know how to call a certain function in another file by running a…
-
0
votes0
answers20
viewsPerform line offset(lead Function) by making the last line 0 instead of 'NULL'
I’m using correlated subsettes to simulate the LEAD function because my Mysql does not support this function, by scrolling the rows of a column. However, when moving, either through the original…
-
0
votes1
answer26
viewsBlock catch shows as Undefined to a variable
I have a problem showing the value of a variable inside the block catch. It simply doesn’t print the value of the variable on the screen $sql, here the code: <?php $servername = "localhost";…
-
0
votes0
answers42
viewsSQL syntax error - Python
I have a flask application in which one of the features (log_request) is to record data from a form in an SQL database. When running def log_request, however, I have an error accusing incorrect…
-
0
votes1
answer204
viewsOpen modal bootstrap and ask for password confirmation, if password is right, call another modal
I am asking the confirmation of a password for the user, in case the password is right, call another modal with other options, wrong case, display that the password is wrong. I don’t think I know…
-
0
votes1
answer20
viewsNOT IN/EXISTS in more than one table in the same query
I have a table of employees and I need to extract from it a query of employees who are not registered in any of the positions (architect, landscaper and manager). The column COD of employee is the…
-
0
votes1
answer87
viewsUpdate salary attribute in MYSQL
I’m having difficulty in the UPDATE function, where I need to make a change of - 10% in the DEPARTMENT Table where the Salario attribute is from the FUNCIONARIO and DNOME DEPARTMENT table I’m trying…
-
0
votes0
answers21
viewsComplete 1 table data by searching for information in a second table without adding extra rows in the first table
Initial information: I am using Mysql; Tabela1 has 1,000 lines and is my main table; table 2 has 400 lines and contains the additional information I need to complete in table 1 The key field between…
mysqlasked 4 years, 7 months ago Peter Godoi 1 -
0
votes1
answer121
viewsUpload files to separate folders in the database
Good morning, first excuse my noobisse but I’m still learning kkk I am creating a system (I am using HTML, CSS, Javascript, PHP and Mysql Database), where will have several registered users and each…
-
0
votes1
answer39
viewsProblems in the relationship of two tables
Can you help me with that ? Being objective neither father nor children allow exclusion, it is a strong family bond that was created here: mysql> delete from Routes Where id = 1; ERROR 1451…
-
0
votes1
answer36
viewsList only one image of a product
I am doing a project, where will allow you to register more than one image per product, this has been generating me a certain difficulty. I wanted to list the products that have image and only an…
mysqlasked 4 years, 6 months ago gabrielfalieri 1,231 -
0
votes0
answers492
viewsCompatibility problem when installing Mysql 5.7 on Ubuntu 20.04
I would like, please, your help. I’m trying to install mysql 5.7 on Ubuntu 20.04, following this tutorial from Fosstechnix (https://www.fosstechnix.com/how-to-install-mysql-5-7-on-ubuntu-20-04-lts/)…
-
0
votes0
answers47
viewsMYSQL - Query, Find last values of a database based on the day and time of the record with an Inner Join
good afternoon... I need a help from the noble programmers of this forum to solve a small bug (I say I’m not a programmer, I’m curious). I have 2 databases, the first database is dynamic, it…
-
0
votes0
answers34
viewsMYSQL - Largest date and number of days of the current date
I have a table where reports of calls are stored. Each report may have one or more work dates. The main fields would be: nr_relatório, dt_trabalho I need to list only those reports whose working…
mysqlasked 4 years, 6 months ago user3771516 433 -
0
votes2
answers56
viewsHow to return only the last maintenance line of each equipment?
I’m implementing the report module in a system I’m developing, but I can’t get where I want, my scenario: I have an equipment table, linked by foreign key to another table called maintenance, in the…
-
0
votes0
answers43
viewsMysql optimize Query
SELECT data_envio, nota_fiscal, nome_cliente, modelo.nome, conteudo.quantidade FROM conteudo, equipamento, caixa, pedido, cliente, modelo WHERE pedido.numero_pedido = conteudo.numero_pedido AND…
-
0
votes2
answers124
viewsHow to update some fields of a table
I am using the framework based on Java Scrit and Nodejs,Adonisjs.Need to update some fields in a table. Table fields user need to be changed, by default they come NULLS. The fields are…
-
0
votes0
answers94
views -
0
votes0
answers45
viewsCreate function within MYSQL to change data in the same table
Hello. I have an application that inserts data into a table positions, in several columns, I need to take this data work them and write a new value in the column odo, that column the application…