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
votes2
answers332
viewsMysql - Select between 2 tables with "String" field
I would like to know how to do a Select to return the nonexistent records, comparing two tables with String field. Example: Tabelas Campo1 Campo2 Tab1 Nome Tel Tab2 Nome email The result of the…
-
1
votes1
answer39
viewsSyntax error: Variable problem inside the IF
My code: DELIMITER // CREATE FUNCTION f_desc (in_preco int) RETURNS INT BEGIN DECLARE fim_preco INT; IF in_preco >= 100 THEN -- aqui fim_preco := format(10 * in_preco/100, 2); ELSEIF in_preco…
-
1
votes1
answer783
viewsPopulate chart with mysql data
I am developing an application in C# and need to fill a graph with the amount of data registered in 3 Mysql tables. It is as follows: The graphic should inform the user in different columns how many…
-
1
votes1
answer113
viewsError returning date
Eae you guys, beauty? I have a problem here, everything was working normally and suddenly started this problem. Follows below the function: function atualizaHoraServidor() { var dia =…
-
1
votes2
answers101
viewsRelationship between tables
I have a certain table already created and populated: CREATE TABLE `formulario` ( `id` int(4) NOT NULL AUTO_INCREMENT, `nome` varbinary(50) DEFAULT NULL, `carteira` varchar(30) NOT NULL,…
-
1
votes1
answer399
viewsHow to run Processlist periodically on the command line?
Is there any way to see the command SHOW PROCESSLIST from X to X seconds via the command line? I am using Ubuntu 16 Operating System.
-
1
votes1
answer77
viewsJavascript possibly disturbing Mysql query
I recently started working with SQL databases and have had problems storing date columns in my tables. Basically what happens when I try to store a variable in the format yyyy-mm-dd, for example…
-
1
votes2
answers1447
viewsWhy do I need WAMP (example) for Mysql to work?
When I started studying programming with database access, I had to install software like Mysql and WAMP. I know what WAMP is about, I know it’s a package of tools needed when programming, but I…
-
1
votes1
answer78
viewsInsert data into database
How could I insert the data from the image below into the database I created . is not giving and I only entered this 0. that’s the code <html> <body> <head> <meta…
-
1
votes2
answers576
viewsProblem when performing Join in tables with generalization
I’m having difficulty performing a JOIN in tables the problem is the following: In a school bulletin system I have users, including students, guardians and school employees. I need to generate an…
-
1
votes1
answer2413
viewsCopy records from one table to another via select
I am copying the records from one table to another in different databases, but a column in the new table cannot be null and the data coming from the old table are null. Is there a way to put some…
-
1
votes0
answers30
viewsBD Mysql Sync
Good morning, About Mysql data synchronization where you have the Master server and the Slave server, I would like to know if it is possible for me to have several master for a single slave, where…
-
1
votes1
answer105
viewsUpdate with SET giving error
I have several UPDATE with practically the same code as this: UPDATE cliente SET Email = '[email protected]' WHERE idCliente = 0000; But some make this mistake: Data truncation: Data Too…
-
1
votes1
answer223
viewsDatabase Structure - Php and Mysql - Marketplace
good evening, I have a store system. A database in Mysql for all, I am re-structuring, however I am with a dilemma to solve. Customer registration! Because I have only one bank, I have only one…
-
1
votes1
answer979
viewsWrong login and password with php
Good afternoon, I am creating a simple login and password system but I came across some strange error, when I put the email and password and try to enter it accuses me that the password is wrong,…
-
1
votes1
answer542
viewsAdd one array within another
Hello, I searched how to add an array inside the other one but the result was not quite what I expected. I have the following code: else if ($_GET['type'] == "listaJogos") { //echo 'Tipo de…
-
1
votes1
answer88
viewsHow do I visualize responsible with dependents
Man select is wrong. How do I view this user’s dependents: I have 1 user: (Mauro Santos) and 2 dependents: (Thiago and Dhalila), how do I view on view. Select SELECT * FROM cad_lideranca WHERE…
-
1
votes1
answer81
viewsinsertion in related tables
Hello, I am working with some related tables and I can not insert the values in the next rabela, I found that I need to recover the last id inserted in the still can not use it, without the relation…
-
1
votes0
answers103
viewsHow to name constraints in Mysql?
I’m trying to name constraints in the MySQL but unsuccessfully, I’m doing it this way: create table if not exists pessoas ( id int auto_increment, nome varchar(30) not null, data_nascimento date,…
-
1
votes1
answer32
viewsPrint information from a php file that generates json
My.php data file generates a json on the screen with the database data, as I could do to take this generated json data and print it to a table for example?…
-
1
votes0
answers34
viewsApplication . Net losing reference
Good afternoon. I have a web application developed in c# that uses connection to the Mysql database. I added the reference, the codebehind recognizes the Mysql reference without problems. Only when…
-
1
votes3
answers162
viewsSyntax error in Mysql
I was creating a table in Mysql and this error appeared in this code: USE cadastro; CREATE TABLE países( cod_país INT NOT NULL AUTO_INCREMENT, nome_país VARCHAR (30), PRIMARY KEY cod_país ); 1…
-
1
votes0
answers70
viewsPanel to hide PHP user page elements
Good evening, I am making a management system for the company and now appeared an unforeseen requirement that I need to adjust. Inside the administrative page of each customer there are buttons that…
-
1
votes1
answer996
viewsGROUP BY - Display grouped result using WHERE as a condition in the same table - Mysql
I am trying to assemble a query to search results in a table where I need to determine a condition for one column, group by another and Display a third. The database consists of 6 Tables, 5 of which…
-
1
votes1
answer130
viewsMake INNER JOIN on two different bases
I have 2 different Mysql databases, I can make a query on one basis or another specifying which connection I will use so: $result1 = mysql_query($sql1, $banco1); $result2 = mysql_query($sql2,…
mysqlasked 6 years, 3 months ago caiocafardo 1,897 -
1
votes1
answer288
viewsError while trying to connect bd MSSQL Server using PDO
I cannot access the MS SQL SERVER database using PDO. I’ve done everything, the best answer I could was with the code below, but I keep getting an error reply: SQLSTATE[] Connection Error (null)…
-
1
votes1
answer38
viewsSave duplicate arrays to an Insert
Tenhos arrays duplicados produto[] valor[] qtd[] total[] produto[] valor[] qtd[] total[] I need to save these arrays in an Insert, like this: INSERT 'tabela' (produto, valor, qtd, total) VALUES…
-
1
votes2
answers1938
viewsHow to Sub Select in SQL
I wonder if anyone can help me because I could not do the command sub select between two tables, someone could help me? I need to pull the name of the book that’s on the table book along with the…
-
1
votes1
answer517
viewsIs there a command to list all foreign keys of a MYSQL table?
I would like to know how to list all existing Foreign Keys in a specific table. For example: usuarios [id, nome, nivel_id*, empresa_id*, cargo_id*] In the above case, list the fields empresa_id,…
mysqlasked 6 years, 3 months ago Wallace Maxters 102,340 -
1
votes1
answer40
viewsHow to catch the latest releases of an Inner Join
Staff to making a query in 3 tables with Internet, follow the code: select itensVenda.idVenda, itensVenda.idProd, itensVenda.qtd, produtos.id, produtos.descricao, produtos.foto, venda.id,…
-
1
votes1
answer54
viewsServer delay to record and access information
Good morning/afternoon/evening everyone, I’m having a problem on two php-mysql sites; First of all I want you to understand the situation, I own 2 sites that record information on the same basis,…
-
1
votes0
answers194
viewsMysqldataadapter Fill giving error
When using database connection in C#, I saw many ways to do. I can insert data into the database very smoothly, but the selection of data is making me gray. Below the code and soon I will explain…
-
1
votes1
answer37
viewsHelp with SELECT returns
The SELECT below when run directly in Phpmyadmin, returns all the results I want, but when I use in PHP function it comes empty: $user = $_SESSION["usuario"]["id"]; $sel =…
-
1
votes1
answer44
viewsRankin in in Mysql
I’m trying to generate a ranking of absences for HR. The record of absences is made in a separate table of the Employee’s registration. I need to bring the list of active employees and the amount of…
-
1
votes0
answers250
viewsIs there a Sqlite PHP simultaneous connection limit ?
I currently use Mysql on my server with a limit of 50 simultaneous connections.. thought to use SQL Server which in turn has no simultaneous connection limit but is very expensive!!.. So I thought…
-
1
votes2
answers275
viewsForeign key FK, is each identification number on a table?
Example: - CLIENTE(Num_cliente, Nome_cliente, Cidade) - PEDIDO(Num_pedido, Data_pedido, Num_cliente, Preco_total) - ITEM_PEDIDO(Num_pedido, Num_item, Quantidade) - ITEM(Num_item, Preco_unitario) -…
-
1
votes3
answers1758
viewsDisplay comma separated results with Mysql
administrador | regiao bruno | 2,3,4 pedro | 1 jose | 5,7 I have an administrator table and a region table, where 1 administrator can manage a region or several. I want to make a query that brings…
-
1
votes1
answer283
viewsRegister and display image in PHP database
Hello, I would like to know how I can register an image in the database and how do I display - there I searched on the internet and saw that the field in the bank has to be as longblob or has to be…
-
1
votes2
answers1547
viewsInsert data from an array into a mysql database
I get a json from an android application. This json is a java class that has been converted with Gson from java to a string. After the php web server receives this json I convert it to an array. I…
-
1
votes1
answer265
viewsCharset in PHP with Mysql
following: My page header is configured like this: header('Content-Type: text/html; charset=UTF-8'); Set up the Mysql connection like this: mysqli_set_charset($dbc, 'utf8'); In my Mysql database a…
-
1
votes1
answer1369
viewsDouble association with sequelize
I have the following relationship with the sequel // Tasks.js sequelize.models.tasks.belongsTo(sequelize.models.users, { foreignKey: { type: DataTypes.INTEGER, field: 'ASSIGNEE', allowNull: true },…
-
1
votes2
answers76
viewsSelect all persons who have birthday date higher than 2000
I’m trying to select all the people who have a birthday date higher than 2000 That date has to be accurately taking into account the day and month, and not simply decreasing the year!…
mysqlasked 6 years, 2 months ago Pedro Fillipe 55 -
1
votes2
answers1174
viewsHow to do more than one select in the same query?
How can I do more than one select in the same query? I tried it this way (using UNION), but it didn’t work: DATABASE Table: cameras_lines id_camera_linha | nome_linha_camera Table: manufacturers…
-
1
votes1
answer26
viewsWhat is the difference between a documented function and a single argument list?
I was giving a read through the PHP documentation and came across this note when I was going through the function str_getcsv And I was left with the question of what difference that would imply,…
-
1
votes0
answers46
viewscondition to show data in combobox
Galera is the following I have two forms, one of development registration and another of process registration, and in the process has a ComboBox where it is pulled all the projects that were…
-
1
votes0
answers77
viewsDoubt about access control
I’m looking to make an application Android which achieves CRUD in a database MYSQL. I’ve researched that the way to do this is by using a Webservice. I’m new in this area but I’ve done a simple via…
-
1
votes1
answer94
viewsSYNTAX ERROR WHERE - PHP
I have the following code in php: $sql = "SELECT * FROM musicas_curtidas GROUP BY musica ORDER BY count(musica) WHERE musica != 'Rádio Turn - Você em primeiro lugar!' AND WHERE musica != 'Radio Turn…
-
1
votes2
answers97
viewsError with select in mysql
I am having an error log that does not happen frequently. On average 1 time per month. The problem is that I am not identifying the error. I’ll put my select on so you can see if there’s something…
-
1
votes3
answers1130
viewsHow to format a php array
I’m doing an SQL query in my model and in the controller, I’m printing the values of array. The exhibition is like this: Array ( [campo1] => 98 [campo2] => SOLO [soma] => 1 ) Array (…
-
1
votes1
answer425
viewsError executing PASSWORD IN MYSQL SERVER function ( ERROR 1064 SQL SYNTAX)
Error while executing function PASSWORD IN MYSQL SERVE I have the following query: SELECT * FROM users WHERE login = 'FABIO' AND pwd = PASSWORD('2018') LIMIT 0, 50000 You’re making that mistake:…