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
answer822
viewsEcho respecting mysql line break
I would like to know how to make the echo PHP respect the line break of a text in the database. I have a text field in the registration form like this: <textarea id="descricao" name="descricao"…
-
1
votes1
answer28
viewsReturn three different values between two tables that have no relationship in Mysql
I have a database with 3 tables, where relationships and attributes are distributed this way: Precise Retornar o nome, data de nascimento e número do cartão das pessoas em ordem decrescente pela…
-
1
votes1
answer403
viewsList duplicate data
I’m suffering from duplicate data in the bank and I need to list them to verify and delete them. I consider as duplicated data when the value and date coincide, as in the example below, the values A…
-
1
votes1
answer30
viewsSelect in Mysql sorted by the WHERE condition
I have a database in Mysql designed like this: id, nome At the following values: 1, Banana 2, Maçã 3, Uva 4, Laranja I have a select like this: select * FROM table WHERE id = 2 OR id = 1 OR id = 4;…
-
1
votes0
answers31
viewsHow to display the same data listing?
I am creating a sales system and would like to list the quantity sold of each product. So it would not be repeating the name of the product but only the quantity sold. The shape I made is like this…
-
1
votes1
answer76
viewsProblem returning data with Mysql PDO
I have a query that returns the permissions of a certain group of users of my system. I use Mysql with PHP. My SQL command is as follows: select p.Codigo, p.Descricao, (case when gp.CodGrupoUsuario…
-
1
votes2
answers276
viewsHow to return a mysql query as a link?
Folks I am developing an application, and I would like when a search for the search form is conducted to return a value as a link to a given page associated with the searched name, someone knows how…
-
1
votes1
answer31
viewsGroup Last Gone Returned by Insert in database
In this Script below I make a loop where inside it I enter into the bank. at the end of each insert it returns me the ID of the line saved in the variable part database (.$sql->insert_id .) so…
-
1
votes1
answer631
viewsSave value of a variable in Laravel
I’m starting a project in Laravel, and at the sidebar I have a dropdow with a list on which I access the database and bring information from 3 companies for example, and when I click on one of these…
-
1
votes1
answer510
viewsCreate iReport variable for database
I need to create a report of the selected month with the information contained in the database, for this I intend to create a variable in iReport that receives the month (by netbens) which will be…
-
1
votes1
answer53
viewsError doing email query in bank
I am getting an error in Netbeans when making a query in an SQL database that validates user login from email: package Modelo; import java.sql.Connection; import java.sql.PreparedStatement; import…
-
1
votes1
answer228
viewsSearching user data for a Session
I’m making a site where several users can log in. I logged in for the login but I can’t find the other user data that is in the database. How can I do this? have the function $usuario =…
-
1
votes1
answer28
viewsUpdate the last record with WHERE MYSQL
I wanted to make UPDATE in the last record of the table, where the agent column is equal to "4827" I tried to use this way but error occurs: UPDATE login_agent SET data_hora_login_saida = 'DATA_FIM'…
-
1
votes2
answers57
viewsQuery in two different tables in Wordpress
I have a code, where it returns me some data of all users of the table wp_usermeta, ( in case I’m only pulling the full Name, and the Capabilities, but to get more complete my table, I would like to…
-
1
votes0
answers199
viewsProblem with duplicate mysql record
I have a script that receives requests from the free market when there is some update on a request. When an order is placed, the free market sends 5 to 10 requests to that script at about the same…
-
1
votes1
answer507
viewsMerge two php+mysql query tables
I have two tables: bills payable and receivables. The two tables have: code, description, date, payment date, date of receipt and value. Like I make a query to take the data of the two tables…
-
1
votes1
answer3631
viewsError: Uncaught Error: Class 'mysqli' not found
I’m using Apache to make a site localhost, but I have an online bank and wanted to access it I make the connection in php <?php $servername = "host.com"; $username = "user"; $password = "pass";…
-
1
votes1
answer67
viewsSingle download page for each user
I am trying to create a user area on my site with PHP and Mysql, so far I have managed to make the login system and a private page for clients. The question is how I could make a single page…
-
1
votes1
answer37
viewsSelect model according to brand
I have the function that returns all registered tags: (With the ID and TAG fields) public function lista(){ $lista = array(); $n = 0; $db = new mysql(); $exec = $db->executar("SELECT * FROM…
-
1
votes1
answer40
viewsBackup Database - error in SQL Syntax
I am building a button to make a backup of mine dbvia application C#, everything is going well, but at the time of applying the Executenonquery is accusing error of syntax. Follows: Designate Path:…
-
1
votes2
answers383
viewsArray within PHP Array
I’m creating a system where you can add drugs by protocols. Ex: PROTOCOL NAME [ARRAY] NOME DO REMÉDIO [ARRAY 2] NOME DO ITEM QUANTIDADE TEMPO DE INFUSÃO [ARRAY] NOME DO ITEM 2 QUANTIDADE 2 TEMPO DE…
-
1
votes1
answer68
viewsMultiple upload of troublesome images
My upload system did not give error until testing on a server there that returns me folder permission error, for when it will generate the folder with the title that comes from the post method, does…
-
1
votes1
answer92
viewsWhat is the best practice for consulting in large tables?
I have a system composed of several tables.One of the tables is called Publications and contains 15 varied fields, 3 of which are the main ones of my doubt: 1. titulo - varchar(100) 2. subtitulo -…
-
1
votes2
answers855
viewsUpdate Inner Join (update in two tables) - Php; Mysql
I have two tables and I want to do a Join to update both at the same time. Table1: Clipping (id, dia_semana, data) Table2: imagemClipping( id, id_clipping, titulo, dia_semana, data, imagem)…
-
1
votes2
answers1343
viewsApparmor DENIED Mysql
Personal hail. I am facing a small problem with my MYSQL on Linux Mint. When I try to initialize the service, APPARMOR denies me permission, follows the logs: Ago 28 09:07:42 Comerlatto-NTB…
-
1
votes3
answers62
viewsMy dropdown doesn’t matter bank options
I have a form with a dropdown, that should have as options users registered in a table of my database. The connection: <?php $connection = mysqli_connect("localhost", "root", "", "db_formacao");…
-
1
votes1
answer80
viewsError trying to log in with mysql
I am trying to log a user to my system using a Mysql database, but it is returning me a Nullreference error. I tried to check if it was null before converting to string, but the error persists. Why…
-
1
votes1
answer323
viewsQuery mysql_query does not return the column
Greetings to everyone in the community. I’m going through a strange problem. When I select query syntax and paste in Phpmyadmin, the query returns all the fields I want. But when I put it in the…
-
1
votes1
answer238
viewsReturn all data to a mysql_fetch_assoc
I have a query that returns the data below: nome -------- vencimento Joao -------- 09/08/2012 Maria ------- 04/12/2015 That is to say, two records. However, by putting it in PHP code only the top…
-
1
votes0
answers94
viewsList in PHP using Next and Previous
I have a system of next and previous with zoom What I want is that when I click on next or previous product change by ID from the Bank. and in the zoom show the zoom of the image that is on the…
-
1
votes1
answer282
viewsRelationship of tables with the same attributes
My system is for employee control. Where we have the following types of people(or positions): agent, analyst, supervisor, coordinator and manager. Like I did: I created a table for each type of…
-
1
votes1
answer1316
views"Wildcard" character as a query criteria
I am trying to create a query criteria selection engine. For example: I have a mass of data where the following variables exist: store code Brazilian state in which it is located Brazilian region in…
-
1
votes1
answer3566
viewsMysql PHP XAMPP - Connect to database
Hello, I need to create a webservice, but I have little experience with php and mysql, so I have some questions, I am using XAMPP and Mysql Workbench, in Workbench I did the connection test and said…
-
1
votes1
answer707
viewsUpdate does not update database records
In my system has a registration page and a page with a table with the information of registered. In this table there is an edit button that links with an equal form of the registration page. What…
-
1
votes0
answers276
viewsHow to include banner in the middle of the text?
I am rebuilding an old project, written in PHP with Mysql. For practical purposes, consider it as a news portal. In the database there are several articles, which I list on the site by simple query,…
-
1
votes1
answer3821
viewsError "Uncaught Pdoexception: could not find driver" in Wordpress on localhost
I’m trying to put a Wordpress site in Xampp (localhost) but when running it appears the following error: My mistake: https://prnt.sc/gjytdc Fatal error: Uncaught Pdoexception: could not find driver…
-
1
votes3
answers3361
viewsHow to convert 0 to null (Error inserting NULL into an INT field from a variable)
I am editing this question to be more didactic for other members, since there are only publications addressing this situation outside the community en. I own a field INT property UNIQUE that may…
-
1
votes1
answer625
viewsComparison of Mysql data from two different databases - PHP
My web application should access two different databases on different servers, put the column of the two databases on the screen and compare the result between them. However, it only returns the…
-
1
votes1
answer1527
views -
1
votes2
answers313
viewsUse INSERT using SELECT (Node.js and Mysql)
I need to insert some data into a table, using the following code: var query = `INSERT INTO uso (id_usuario, id_tempo) VALUES ((SELECT id FROM usuario WHERE nome='Jose' LIMIT 1), (SELECT id FROM…
-
1
votes1
answer878
viewsHow to generate two Google Charts on the same page?
I know that the code below generates 1 graph inside the page but I need to generate several graphs and I do not know the logic used to achieve, dynamically, the goal. Can you help me please?…
-
1
votes1
answer255
viewsSQL command does not work with select
Follow my complete code: <? include("conectar.php"); $query = "select * from pagseguro ORDER BY Referencia DESC"; $result = mysqli_query($db, $query) or die(); if($_REQUEST['alterarStatus']){…
-
1
votes0
answers60
viewsPostback taking database data with PHP
I have a database in MYSQL where one of the fields informs the status of a particular transaction. For example: status = waiting or status = complete. I want to do a cron that every 10 minutes takes…
-
1
votes2
answers247
viewsMysql does not save all characters
I implemented the Ckeditor in my textarea, but it is not saving the data correctly in the BD. The result is like this: If I write Testing in bold, the result of pure html would be:…
-
1
votes2
answers81
viewsSearch all records that exist in another table at least once
Hello, I’m having trouble making the following query: I have 3 tables: user_categories, main budget and orcamentos_new When a user creates a budget, the system creates a record in main budget with…
mysqlasked 7 years, 2 months ago Everton Neri 680 -
1
votes1
answer926
viewsHow to make Inner Join in associative table?
Tables and Indexes: CREATE TABLE CLIENTE( IDCLIENTE INT PRIMARY KEY AUTO_INCREMENT, NOME VARCHAR(30) NOT NULL, SEXO ENUM('M','F') NOT NULL, ID_CARRO INT UNIQUE ); INSERT INTO CLIENTE VALUES…
-
1
votes1
answer336
viewsMysql Auto-increment conditional on a table column
Hello, I’m trying to create a vehicle table that looks like this with php and mysql: +----+-----------------+-------+--------+ | id | nome do veiculo | marca | codigo | | 1 | Gol | VW | 1 | | 2 |…
-
1
votes1
answer149
viewsProblems updating data with empty Datetime
I need help with the following... I need to update several data at once through my application, however, one of the conditions is that the field exit in the database is empty as it will be updated.…
-
1
votes2
answers66
viewsPermission system
I have a system with login required. What should happen: If the "active" column is = 1 redirects to a given page, if = 0 redirects to another. <?php if (!empty($_POST) AND (empty($_POST['id']) OR…
-
1
votes0
answers83
viewsPDO returning error when no error
Randomly, I get the following error while upgrading my system: Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Cannot assign requested address By error, it can not connect to the server,…