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
-
2
votes2
answers59
viewsnonexistent origin registration. How to bypass? Foreign Key
I have a field in a table of celulas who asks for the number of celula that gave it origin. Example: We have the table celulas: idCelula, nome, etc ... origem That one origin ago reference at the…
-
2
votes1
answer606
viewsHow to update an image to the database with Laravel?
I managed to upload the photos in the database, but I can’t update these photos, when it is updated it deletes the image from the database but does not use the new. I kind of tried to copy the code…
-
2
votes1
answer44
viewsI can’t place a database data in a value of an input from my form
This is a CRUD in php where the only option missing is the editing of a register, it happens that I intend to use the same form The problem is that when I click edit the fields of value inputs…
-
2
votes1
answer41
viewsA field in table 1 related to 2 fields in table 2
Let us suppose two tables Table 1 : emp (table of employees) Campos : emp.no (chave privaria), emp.name (chave múltipla, não primaria) Table 2: webConference Campos: webConferencia.no (chave…
-
2
votes2
answers1212
viewsAdd sold quantity of all SQL products
I have two tables in a Select through an INNER JOIN, I would like to know what I did wrong so that is displayed the list of products of all sales and the total amount sold of each product..…
-
2
votes0
answers55
viewsQuery return interaction with Array
SQL: SELECT t.idMembro, t.nomeTabela from ( SELECT idMembro as idMembro, 'pastores' as nomeTabela FROM pastores union SELECT idLider as idMembro, 'redes' as nomeTabela FROM redes union SELECT…
-
2
votes1
answer91
viewsCan I pass 2 Laravel array_encode?
I can pass 2 json_encode in a single function in the Laravel? What is the best way to return 2 JSON different? Where 1 consults the table Products and the other the table States. Look at this…
-
2
votes1
answer444
viewsError when running php Artisan migrate
I am trying to create the tables and this giving the following error: BadMethodCallException : Method Illuminate\Database\Schema\Blueprint::number does not exist. at…
-
2
votes0
answers41
viewsHow to add two result fields in a query already formed in SQL
I need to add two fields in a query already existing in SQL SERVER, but I don’t know how to add them in an existing query. I will try to detail more what I want with the images below: I have this…
-
2
votes0
answers139
viewsSelect to group items with related words between the same field
Good morning, I have a database of approximately 40 thousand lines for each product one line. I was using a catalog table (the same as category) where each item (product) that was inserted was…
-
2
votes1
answer213
viewsColumnchart not reverting colors of options google Charts
I am filling a Columnchart with the data brought from mysql, only that I would like to put the columns of different colors, more unsuccessfully. Shows the same color in both columns, as you can see…
-
2
votes1
answer55
viewsProblem showing data Many to Many
I’m having trouble displaying the result of the query. I’m not being able to display the results correctly. I have the following tables and records: CREATE DATABASE IF NOT EXISTS `livraria`; USE…
-
2
votes1
answer255
viewsMysql - Update on every Row
Guys, I’ve been trying to put together a line of code for a while, but I never get the desired result, ever arrived in 3 codes but none of the 3 executes the code for each result found. It is…
-
2
votes0
answers75
viewsImprove Mysql query performance
I have this query where I do left join to three tables and returns the data from the 3 tables: SELECT Carro, Produto, Sim, DataP, Stock, Obsevacao, Colaborador, DATE(`Data`) AS `Data`,…
-
2
votes1
answer57
viewsChanging tags automatically
I am creating a function for sending email via nodemailer, and our have some templates that are for specific cases. I need a function that once you receive the Welcome template for example,…
-
2
votes1
answer51
viewsDelete duplicate rows in a table
I used the following SELECT to find the repeated values: SELECT nome, Count(nome) FROM projeto GROUP BY nome HAVING Count(nome)>1 Now I need to delete everything that is repeated and leave only…
-
2
votes2
answers242
viewsCodeigniter database information array
For example, I am sending an id array [0] => 1, [1] => 3 and I want to show this in my html as a result. In the case that you search in the database with the first id save in the array and…
-
2
votes1
answer84
views -
2
votes1
answer1091
viewsGenerate a pdf of a table in html and php?
Basically I have 3 tables , I’m making a kind of Inner Join in php kk and generating a new table with the data I want ,has how to turn this table into pdf ? ` <table> <th>Nome do…
-
2
votes1
answer38
viewsDoesn’t just open the post by id
Can someone give us a little help, please? When I press on a blog post, I should just show that post on another page. But I’m not being able to show this post. For everyone I open, it’s always…
-
2
votes1
answer202
viewsProblem when displaying image between html tags
I’m trying to display in a template images that are saved in a database, the insertion and the search of the image are done correctly, the display also, however to some extent, because when I try to…
-
2
votes1
answer473
viewsFiltering in Bogotá
Hello, I’m having a problem to perform filters on a DataGridView I am using Windows Forms and pulling information from a Mysql database to the DataGridView called dgvDados the information is being…
-
2
votes1
answer250
viewsView much slower than direct mysql query
Good afternoon, everyone, I’m migrating a Delphi/Firebird system to Php/Mysql, And I’ve come across a situation I can’t understand, I created a view in mysql to generate a report, the same view I…
-
2
votes1
answer147
viewsHow to properly configure JSON return with content coming from Mysql with accent
I have a problem in the return JSON of some information from my BD, some are accentuating and the answer fails, I have tried some past suggestions, such as this: $response = utf8_encode($response);…
-
2
votes2
answers562
viewsMysql alias in all Columns
Good afternoon Galera. I have a little problem to join some tables by INNER JOIN, and because the columns name are equal, I imagine that the ALIAS can save me by changing the columns name pro front.…
-
2
votes1
answer32
viewsData is not going to Database Mysql/PHP
The page does not show any error, I already put the ini_set('display_errors', 1), but no errors appear, it loads, but it also does not redirect to my final page, it is only a blank page <?php if…
-
2
votes2
answers68
viewsQuery is not updating null values
I’m analyzing the data from a student database, the data is entered by the users themselves, and I can’t change the format of the tables and the database itself, just modify the values of the…
-
2
votes1
answer127
viewsExtract of hours online per day
I need to extract from the freeradius-powered RADACCT table, Radius server with Mysql, the connection records of a given user, for each day of the month, to determine how many hours that day the…
-
2
votes1
answer136
viewsWhat is the difference between int and variable with php casting?
I am developing a small system that includes javascript and php code, linked to Mysql. I’m trying to send a code that will be set in JS as an argument for a php function. However, when I test the…
-
2
votes1
answer131
viewsCount quantity shopping cart
Good evening, I need to count the amount of products that are in the cart in the quantity field. I am using PHP PDO and MYSQL TABLE id | quantidade | produto 1 | 5 | 582 2 | 8 | 122 The total needs…
-
2
votes1
answer110
viewsInsert cloned items into the form with PHP and Mysql
Friends, I’m having trouble recording cloned Mysql fields in the form. I’ll try to explain in detail to see if my friends can help me. <div class="mb-md"> <a href="#" id="but_add"> <i…
-
2
votes1
answer206
viewserror when connecting mysql with Node.js
am connecting mysql with Node but is giving this error: C:\E. S\dao.js:10 if (err) throw err ^ Error: getaddrinfo ENOTFOUND localhost:806 localhost:806:3306 at GetAddrInfoReqWrap.onlookup [as…
-
2
votes2
answers206
viewsHow to use GROUP_CONCAT in the WHERE clause, with numbers?
Good morning. I have the following tables in a Mysql database: BOIS ------------ | id | boi | ------------ | 12 | 77 | | 22 | 8 | | 14 | 12 | ------------ BOIS_MANEJO --------------------- | id |…
-
2
votes1
answer299
viewsSave items from a Checklist form in the database - Laravel
I have a Checklist form that is generated dynamically. When saving the array persists in the error message: Array to string Conversion (SQL: update checklist_protocolo set projeto_id = 4, modelo_id…
-
2
votes2
answers432
viewsSelect from multiple tables with the same ID in Mysql
The intention of the query is to select all records of various tables when the ID is equal to the one passed in the parameter, echo of the SQL line displays the query below, the records exist, but…
-
2
votes1
answer242
viewsAn Exception of type System.Nullreferenceexception occurred in Entityframework.dll when trying to insert given
I am trying to save a data in a table on the server using entityFramework, but is making an error of Nullreferenceexception. The insertion code is: public void CadastraFaleConosco(FaleConosco fale)…
-
2
votes2
answers548
viewsHow to use Mysql SELECT + WHERE + IN with Javascript array?
How can I perform the following SQL query by passing a Javascript string array? SQL query performed in Mysql - status OK: SELECT * FROM tab_price_list AS PL WHERE PL.PartNumber IN ('HDW00008.ELEM',…
-
2
votes0
answers83
viewsDatabase variables are not added in $_SESSION array
I am building a cart for an application. I want to add the name, quantity and price of the product inside the cart. For this, I do: In the header I include in the pages accessed by the client:…
-
2
votes0
answers187
viewsChange wordpress database Woocommerce
I made a system for the back-end of a wordpress store that uses the Woocommerce plugin. The client requested me to make a login system with custom registration, because well, I made the system with…
-
2
votes3
answers113
viewsSelect two tables
Good afternoon! Please I’m not managing to make a select I have two tables in the bank (campaign and campanha_clicks) I need to select only the results with the table type=2 (CAMPAIGN) and at the…
-
2
votes1
answer76
viewsExtension . pdf does not download php
Good night, I have a table in the database that registers files(pdf,img,png and etc...) called billets: CREATE TABLE boletos ( protocolo int(11) NOT NULL AUTO_INCREMENT, boleto mediumblob NOT NULL,…
-
2
votes2
answers67
viewsProblems with resubmission of form in the POST method
On my system I have a form that adds products to a sale, using PHP and Mysql. It works beauty. When I add the product I go to another page that inserts the data and then back to the sales page. The…
-
2
votes2
answers891
viewsDatabase modeling of a banknote system
I need to create a database for a banknote system, but I’m terrible with data modeling. I did the modeling but I don’t know if it’s correct. The fields are not yet definitive, I just want to know if…
-
2
votes1
answer37
viewsSQL, Relation between SQL tables
My question is about the list of tables in sql. In an academy system I want to make a relationship between the student and his training record. I made a relationship from one to one, because each…
-
2
votes2
answers191
viewsCOUNT() query does not work
The purpose of the query is to list, within a user-defined period, all states and their total number of independent quotes if zero. Customers must be active (status 30) and have city id number…
-
2
votes1
answer584
viewsHow to optimize Mysql Insert speed?
I created a test table and added a script that randomly generates characters and an Insert in the a, b and c fields. For the realization of 1000 INSERTS took the time of 36s and running the same…
mysqlasked 5 years, 5 months ago Matheus Rangel 31 -
2
votes1
answer299
viewsInsert being executed twice
I have a code for when a logout in the system, to be registered in a table of the database. I call this file that logs out when I click the quit button and also when I close the window in the…
-
2
votes1
answer41
viewsQuestions regarding Events mysql
I created an event in a database Mysql, I noticed when I restarted the bank localhost, the event returns offline, someone knows if it is like that or if you have to execute a command whenever the…
mysqlasked 5 years, 4 months ago Amanda Garcia 65 -
2
votes4
answers674
viewscode of the PHP page appearing when clicking the Submit button of the form
On my html page I have the following form: <form method="POST" action="index.php" class="header"> <label for="km_tdo" id="lbTdo">KM troca de óleo:</label><input…
-
2
votes2
answers2394
viewsHow do I get the Logged in user ID in the PHP session and play in a variable to insert?
I need to get the user ID already logged in to play in an Insert query, because I will connect it to a Foreign Key Employee. I need to get this ID, only I’m not sure how to proceed and I’m beginner…