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
answer27
viewsTyping error when receiving foreign key from the database
Good evening, basically this is a list I did to show the data that were entered in the database, but I have been finding typing problems on lines 1 and 2 (marked as comment), as predicted, the…
-
0
votes0
answers114
viewsCould not find specified column in Results
I have a code to search in two tables, a search the logo and the other the images, the first he does normally, does the reading and everything else, in the second he already error, the code is as…
-
0
votes1
answer187
viewsQuery mysql rows for columns
Hi, I know there are some similar questions here already, but none of them helped me. I have the following table in my database: +----------+---------------+--------+ | id_bolao | data_concurso |…
-
0
votes1
answer439
viewsOptimize 20 Million registry mysql database
Create code: CREATE TABLE `tb_empresas_ativas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cpf` varchar(255) DEFAULT NULL, `nome_cliente` varchar(255) DEFAULT NULL, `razao_social` varchar(355) DEFAULT…
-
0
votes1
answer211
viewsMysql returns Localdate a day ago
I am unable to identify a problem using Java Localdate with Mysql Date. When saving a date in my Mysql database it saves on the correct date, for example: 2019-05-24. When doing a search using…
-
0
votes1
answer23
viewsStore two names in the same column
I’m in doubt about best practice to create a certain table. I have the table "Texts": My problem is with the column "authorship". Because the authorship has 3 options see: If the user selects the…
-
0
votes1
answer35
viewsmysql Connector problems in python
I’m having trouble connecting to mysql.connector.. In php myadmin, connects normal, and also bash is entering normal in mysql.. Only python gives this problem..…
-
0
votes0
answers57
viewsField with different value than expected with Laravel and php
I have a field in the bank of up to 50 characters where I save the access key of a receipt, but when I search the information it brings me a totally different number, what happens?…
-
0
votes1
answer39
viewsEditable table with Jquery and PHP problem
Good afternoon, I’ve been having a problem for a few days trying and I can’t seem to fix it, I am trying to make an editable table, the problem is that after I copy the table with json I can’t do…
-
0
votes1
answer46
viewsType and search in Combobox
I wonder if there is a way and how to do: type and appear the names in a Combobox, is already listing the database data in the combobox, but I would like to type the initial of the name and go…
-
0
votes2
answers293
viewsPutting date and time in a backup in file . sh
I’m using a script to back up my database that I have in Mysql, I’m wondering how to put the date and time backup instead of just the date: He gets like this: alex_banco-2019-05-28.sql But I wanted…
-
0
votes1
answer39
viewsSelect 3 Random values in mysql table
I am trying to make a change to a code that will read in a mysql table the following: $getmaps = safe_query("SELECT * FROM ".PREFIX."cup_maps WHERE mappack='".$set['mappack']."'");…
-
0
votes1
answer67
viewsSort by two date fields
I have the following structure: ID | PROMESSA | VENCIMENTO 1 | 2019-01-04 | 2019-10-08 2 | 2019-01-03 | 2019-10-07 3 | 2019-01-02 | 2019-10-06 4 | NULL | 2019-10-05 5 | NULL | 2019-10-04 6 | NULL |…
mysqlasked 5 years, 11 months ago Pedro Augusto 2,392 -
0
votes2
answers803
viewsMysql query with LIKE
I made the query below to return all records containing the word 'Juscelino' in the user table, the word 'Juscelino' repeats 3 times, the query searches in 3 different fields, which is not required…
-
0
votes1
answer64
viewsDetermine display order of ordered queries in MYSQL
I have three types of orders in the table and need to get the result so I choose who will index first. I specify the respective indexing order: ( ORDEM_COMUM IN FIRST ) ordem_comum,…
-
0
votes1
answer134
viewsI cannot access SQL query property on Node.js
I’m trying to create a code that logs into a website, but when it takes the data from the database to do a check, I get an error. My current code: router.post('/loginClin', function(req, res, next)…
-
0
votes1
answer74
viewsPHP - Mysqli INSERT INTO does not work
$connection registering.php Take it easy there <?php include 'conexao.php'; $nome = $_POST['nome']; $email = $_POST['email']; $sexo = $_POST['sexo']; $nascimento = $_POST['nascimento']; $telefone…
-
0
votes1
answer115
viewsProblem Bringing Database Data to html
hello people I am doing a school project and would like a help in this part, here should happen the following, when the customer select the attendant in select Service should be listed the services…
-
0
votes1
answer85
viewsHow to save and retrieve multiple returns from an AJAX request in a loop?
Gentlemen, good night, sir. I am trying to accomplish the following task, I am sending via AJAX to another page 3 cep’s, when I get there I give only an echo of the sent cep to know that arrived,…
-
0
votes2
answers187
viewsMake the result of a table appear in AJAX
I am making a div with form to be hidden, and using AJAX for when it is clicked on the search button div is visible, and brings the result of the database in PHP. Only that I just can’t put my chunk…
-
0
votes2
answers616
viewsHow to make a SELECT DISTINCT with COUNT in Mysql?
So, I need to make a SELECT that searches the bank for information about all the activities of the companies and returns the sum of all the "QNTD_PROCESSOS" of that activity. I’m trying to make a…
-
0
votes1
answer37
viewsError changing record in table
I can change manually, but in the error project.. The Error: Cannot add or update a child row: a foreign key constraint fails (sistema.veiculo, CONSTRAINTveiculo_ibfk_1FOREIGN KEY (fk_idassociado)…
-
0
votes1
answer70
viewsINSERT php function in mysql database(checkbox)
I’m having trouble making several INSERTS. Problem: I am developing system that registers tag employee on a table but I’m not able to do everything at once. Example: I would like to register a name…
-
0
votes0
answers43
viewsOptimize deletion of 700,000 records from a Mysql table
Hello, I am in urgent need of deleting 700,000 records on a table with just over 2 million. However, testing on the office server is taking hours because I need to filter a field and I will need to…
-
0
votes1
answer84
viewsShow registration without updating page
Good afternoon, I swear I’ve searched everywhere, but all I see is teaching to create chat :'( I am developing a project (corporate TV style) for the company I work, and the project was serving very…
-
0
votes2
answers44
viewsChoose the order in which items are listed in Mysql
I have a table with three types of order, ordem1, ordem2 and ordem_especial . How can I list items in that order: EXAMPLE: ordem2 ordem_especial ordem1 I tried unsuccessfully something like : REAL…
-
0
votes1
answer113
viewssequelize problem with relays
Hello, I have some tables in mysql, I created the models using sequelize-auto and associations manually. The problem is that when I try to include these relationships I come across the error…
-
0
votes1
answer29
viewsMysql condition for unit of measure specific value
I have a BD view where I need to bring a total amount of KG/LT of products expected to receive in the company, I need to include a condition that when the unit is TON or TN it multiplies by 1000,…
mysqlasked 5 years, 11 months ago Ulisses Gimenes 443 -
0
votes1
answer241
viewsError in Java connection to Mysql Database
I am connecting a Java application to an SQL Database, I have the following connection code: Connectionfactory.java.: package connection; import java.sql.Connection; import java.sql.DriverManager;…
-
0
votes2
answers371
viewsform Ubmit only with Enter key without button does not work
Good night, I have a little chat, in html, php and jquery, I just need to send the message form without button, but it’s just not working, someone could help me is so the code: <form…
-
0
votes0
answers73
viewsError in Mysql sub-query in Workbench
Good morning! My code SQL is making the following mistake: Error Code: 1242. Subquery Returns more than 1 Row 0,000 sec The code is as follows:: SELECT DATE_FORMAT(FROM_UNIXTIME(data), '%Y') AS ano,…
-
0
votes1
answer38
viewsDo Excel formulas continue to work after being imported into a Datagridview?
I have a spreadsheet in Excel where I import it, to present the data in a DataGridView, i wonder if the formulas that are contained in the spreadsheet still work in the DataGridView. To be more…
-
0
votes0
answers109
viewsVery slow Java SE application with remote Mysql BD, how to optimize?
Hello, people. I am developing a desktop application with Java SE and testing the software with a remote database it gets very slow, while with the local database it works normally. The following is…
-
0
votes0
answers51
viewsProblem joining tables in Mysql
I have 3 tables: tb_carne_lancamento AS A tb_partisa_x_recipe AS B tb_plano_accounts AS C In table A and B I have the id of table tb_plano_accounts and both have a value field. I need to create a…
-
0
votes1
answer97
viewsRecord logout time in the session table
I am logging the data into the database table whenever there is a login, but I intend to do update at the time of logout. To do the Insert, do it in by validating the user login:…
-
0
votes1
answer18
viewsPerform an external-based query in the Zend Framework
Model public function excluirFiliadosNaoEnviados($base) { $sql = "SELECT FROM " . $base . ".debito_automatico"; $acao = $this->conexao->prepare($sql); if($acao->execute()){ return true;…
-
0
votes1
answer157
viewsMysql, SELECT according to the specialisation of the generic entity occurrence
In my database I have a generic entity "user", such entity is specialized in two other "store" and "service_provider", this specialization has total and exclusive characteristic, so that, an…
-
0
votes1
answer63
viewsIterating select dynamic on add and remove lines
I am developing an add and remove lines as in image The first select comes from a database with PHP and the ones that are added later dynamically come through getJSON. It is working but are being…
-
0
votes1
answer363
viewsImport JSON to Mysql table
I am trying to import a JSON into Mysql, but without success EDIT: JSON has the structure below, it is return of this wikidata sparql query. The query created a document for each tuple { "_id" :…
-
0
votes1
answer75
viewsHow to upload database data to Welcome view in Windows?
I am creating a system in Aravel 5.3, already activated the auth and put a Carousel in the Welcome view that searches the address of the images in the bank. When accessing the default Welcome view…
-
0
votes1
answer36
viewsFormatted date range - return of between
I am doing a select of a range of dates, however, when I do the formatted is returning data that should not return, in case, more months and less months... Follows interval and query. SELECT id,…
-
0
votes1
answer233
viewsRedeem name instead of id in a select option from the PHP Mysql database
Good night, I’m populating a select option with data coming from the database, but when retrieving the value, I want to recover the name instead of the id.. has how to do this? //chama o arquivo de…
-
0
votes1
answer49
viewsLIKE with strange behavior in MYSQL
I have the following query SELECT p.nome_completo, p.id_pessoa, curr.link_video, prof.nome as nome_profissao, fav.id_favorito as fav_id FROM candidato as cand INNER JOIN pessoa as p on (p.id_pessoa…
-
0
votes1
answer135
viewsCOUNT and SUM with 3 tables
I’m making an IT management system. I have 3 tables: Computers, offices, office_keys Example: offices ______________________________________ id | 1 version | Home & Business 2016 office_keys…
-
0
votes0
answers61
viewsLEFT JOIN. GROUP BY. this is incompatible with sql_mode=only_full_group_by
I have a system I used in 2013. I am migrating to the latest version of php and am having this error: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column…
-
0
votes1
answer375
viewsHow to do 2 Insert at the same time with PHP in MYSQL Database?
Database: DROP DATABASE IF EXISTS mydb; CREATE DATABASE IF NOT EXISTS mydb; USE mydb; CREATE TABLE clientes ( cod_clientes INT UNSIGNED NOT NULL AUTO_INCREMENT, nome VARCHAR (20) NOT NULL, PRIMARY…
-
0
votes2
answers75
viewsList only if the other table does not have a dismissal
Good afternoon. I need to make a list of employees per year. For example. Active employees 2018, However I’m having problems, because in 2019 some were fired there not list the same, and use the…
-
0
votes1
answer97
viewsProblem sorting Mysql results in Datatables
I am following a tutorial of Datatables, and to sort the results with his options the tutorial sends insert the following in the query to be made: $sql1.=" ORDER BY…
-
0
votes0
answers49
viewsHow to concatenate results from an SQL
I have two tables: Produtos, Eventos and Productsprovents(coming from the many ratio for many of the tables Products and Events): I performed the following SQL to get the event data and products…
-
0
votes0
answers46
viewsProblem to create Database with Mysql variable
I have a problem to create a database in Mysql. The term is as follows:. CREATE PROCEDURE trata_busca() BEGIN DECLARE excessao INT default 0; <--- LINHA QUE ESTA APONTANDO PROBLEMA DECLARE…