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
answers240
viewsHow to sort a table according to data from another table
I have two tables Table 1 create table tb1 ( cd_tb1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY ); Table 2 create table tb2 ( cd_tb2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, cd_tb1 int, vl_avaliacao…
-
1
votes1
answer37
viewsControl the data that Mysql sends to Nodejs
I developed a Project that "clones" a proposal and its products, in addition to making some updates, but the return that this procedure returns to my Nodejs is not very useful to me. It is possible…
-
1
votes2
answers51
viewsHow to loop Mysql based on a query
I wonder if it is possible to create an event in the Mysql database, where every 5 minutes the database makes a query, where it returns all the order ids and based on each id I perform another query…
-
1
votes0
answers49
viewsinserting blank line on the seat and one with the right data
When I enter a data in the bank is always recorded a blank line and another with the data I put. I tried to reinstall the xampp but it didn’t work tested on another computer and it worked the…
-
1
votes1
answer307
viewsCarry out consultation with Modal
Hello, good afternoon. I am creating a registration and consultation system, in the query part, within a table it lists the amount of proposal according to the situation. Only that I want that by…
-
1
votes0
answers59
viewsError updating mysql server on linux Mint
I have a machine with Linux Mint which I use as my development server, which is working normally, however, when performing an update (apt-get upgrade) of the installed packages, the mysql server…
-
1
votes1
answer4919
viewsComparing column values in dataframe pandas rows
Good afternoon. I am comparing two given frames, data frame 1 has an sql query and data frame 2 a mysql query I want to compare the two. When the DF 1 record is not in DF 2 I want to save the result…
-
1
votes0
answers363
viewsAdd two "alias" columns in a new alias column
I have the following in my consultation: SUM(vopValorTotal + vopTaxaComissao) as vopValorComComissao Both vopValorTotal and vopTaxaCommission are previously created alias columns. Both are not null.…
mysqlasked 5 years, 8 months ago Maykel Esser 598 -
1
votes2
answers594
viewsComparison of datetime using Laravel eloquent
Hello, I’m having problems using Laravel’s eloquent to create an SQL that meets the following demand: "return a query if there is a reservation made in a certain period of time"; Following the code…
-
1
votes0
answers18
viewsCheck open and closed queries to include event in the calendar
I am developing an online calendar and need to check when it includes an event if there is a date and time in scheduled and open consultations. Queries marked in the database are "no". Open queries…
-
1
votes1
answer490
viewsData with PHP + SQL doing operations
I have some questions: I need to save two dates in the same database table, and I will need to do a function to compare the dates later. Actually I already have a test of it ready, but I thought I…
-
1
votes1
answer33
viewsSearch database image in php
Good morning People regarding the code I am trying to get an image that is in the bank and bring to the page, but it is not bringing the image(Consultation of patient registration). For the…
-
1
votes0
answers317
viewsHow to send the value of a combo box to the database
Man ComboBox brings the ID Primário table Produto to be registered in a new table that is the Pacotes. So far so good, the problem is that if I select another record on ComboBox it saves as if it…
-
1
votes1
answer55
viewsHow to know which columns were modified in an UPDATE using TRIGGER?
Good afternoon, everyone. I am creating a TRIGGER AFTER UPDATE in a table in the BD, and I need to know which columns were changed (regardless of the value that was placed), and put the column names…
-
1
votes3
answers865
viewsSelect with due dates
How to resolve this issue. ID status valor vencimento clienteID 1220 Pendente 37,00 2019-02-20 2888 3146 Pendente 37,00 2019-03-20 2888 3147 Pendente 37,00 2019-04-07 2888 3148 Pendente 37,00…
-
1
votes0
answers31
viewsProblems with Category List / Products
I have work on a product screen with categories and subcategories, but I have found some problems: WHAT I WANT TO DO: I simply want to have a page with the list of products. On the side will be…
-
1
votes2
answers313
viewsCalculate the average of a field in a specific year within a period
I was studying queries in mysql using the Employees demo database (link), when I decided to do a search in the table salaries than would be a report of how much the company spent per year on wages.…
-
1
votes1
answer232
viewsProblem with Mysql Pool conections
I have this class I use to create the connection: class DbConnection { constructor() { this._con = undefined; this._pool = undefined; } _createPool( database , user, password ) { this._pool =…
-
1
votes2
answers127
viewsError while trying to connect to mysql
I am developing a project with Java Web and Mysql and when I went to create the connection and test this giving enough error, I need help to solve this... package br.com.farmacia.factory; import…
-
1
votes1
answer34
viewsQuestions about data listing!
Hello I am developing a project using the Mysqli extension, and in this taking advantage to use some object-oriented functions! I would like to ask a few questions regarding the data listing, are…
-
1
votes0
answers215
viewsAutomatically insert into mysql when reading barcode
I’m trying to create an internal project to record employees' tasks with barcode reading. Right now I have an example of code to read the code and submit in the database table. Code: <!DOCTYPE…
-
1
votes3
answers503
viewsI cannot display the output of a SELECT COUNT (MYSQL) in the HTML page
Hello, I’m having a problem with returning a Mysql query. I make a query that makes a SELECT Count of a field in a database. The problem is when I will display the return of the query in HTML, it…
-
1
votes1
answer26
viewsFetch field name and Insert into
Good, I wonder if someone could give me a little help? I am trying to make a dynamic Insert, where the user chooses in a select box in which table will insert the data. But I would like that when it…
-
1
votes2
answers74
viewsSQL query, count the amount of existing values of a Foreign Key for each corresponding Primary Key in 1 query
Example with 2 tables: table admin: columns: | id_admin | email | password | values: | 1 | ex@ex | 123 | | 2 | ex2@ex2 | 123 | table news: columns: | id_news | title | content | admin_id_admin |…
-
1
votes1
answer53
viewsHow to send the Data Time Picker date to the Mysql database
Speak guys I have a problem that is send my DTPentrar alias DataTimePicker, follows photo of the error and the code, if anyone can give a light thank you. Hugs private void btnSalvar_Click(object…
-
1
votes1
answer98
viewsProblem inserting data into a mysql database via PHP
Hello, the problem mentioned is that even after several attempts, my form cannot enter the customer data in the database. Apparently the data entry is successful, but no information is entered, and…
-
1
votes2
answers43
viewsInsert button value into database
In my project I am creating buttons (in exchange for a form) with the name of the tasks to register daily, so it becomes more practical and faster to register. Code with the buttons: <div…
-
1
votes2
answers82
viewsSelect inside the Where leaving the query too slow?
I have the following structure: And my query is that way SELECT tbl_nfes.*, count(tbl_nfe_itens.pedido > 0) as v, tbl_nfe_itens.status FROM tbl_nfes INNER JOIN tbl_nfe_itens ON tbl_nfes.nfe =…
-
1
votes1
answer18
viewsUnknow table in field list when performing select + sum
I’m trying to sum up the values of several different tables, tried two ways: Without citing the name of the database: SELECT SUM(animais_adocao.animal_pendente + animais_encontrados.animal_pendente…
-
1
votes1
answer26
viewsSELECT in MYSQL resulting in only one record
I make a SELECT direct from the Phpmyadmin panel: SELECT `tx_type` FROM `tx_ar_tax` WHERE `tax_ref` = '75639' AND `tax_order` = 'O'; phpMyAdmin returns 7 records as registered and correct But in PHP…
-
1
votes1
answer32
viewsMysql to SQL Sever
What would the following code look like MySQL in SQL Server 2008: desc `TABLE 2`; alter table `TABLE 2` add column `COLL 44` varchar(20) DEFAULT NULL; alter table `TABLE 2` add column `COLL 45`…
-
1
votes1
answer152
viewsWhat kind of data to store "2019-02-06T14:14:38+00:00"?
I am consuming an API that returns me a field date with that data: 2019-02-06T14:14:38+00:00 In my Mysql database I created a field timestamp, because he was the only close I could find. Well, I can…
-
1
votes2
answers133
viewsMysql - Sort a table and keep records together
I have this table below inside Mysql to which I need to order it from the following form: The table must be ordered in order of CPF. But I need the license plates that match, and I need them to…
-
1
votes1
answer48
viewsSelect by period
I have this select. SELECT 5125 matricula, CONCAT(fum.nomeguerra, ' / ' , fuc.nomeguerra) nomeguerra, date_format(es.data, '%d/%m/%Y') as data, es.semana, es.horarios, es.linha FROM escala es LEFT…
-
1
votes1
answer78
viewsAutomatic PDO and MYSQL listing
Good afternoon. I am trying to make the tables be automatically listed, without me having to name the field. But it’s showing errors. $conn = new PDO($dsn, $username, $password,…
-
1
votes1
answer160
viewsAssociate user data according to "/profile/username" url
Hello I’m a beginner in php and mysql, I’ve searched everything that is singing and I still can’t understand how to associate my user url to id. I would like to know how to associate and display…
-
1
votes1
answer110
viewsUpdate on Timefield Django 2.0
I have a model with several fields, one of them is the Timefield type: class Venda(models.Model): id = models.AutoField(u'AÇAIEX', primary_key=True) hora_saida = models.TimeField(max_length=6) To…
-
1
votes2
answers527
viewsFill in input according to other input response
Good afternoon, I have the following code in my locker: <div class="form-group col-sm-6"> <label class="control-label">{{ trans('app.select_client')}} <span…
-
1
votes0
answers794
viewsHow to send form parameters using Express and Node.js
Hello, I’m trying to post the data of a form using Express, follow the code below index.html <form action="insere" method="post"> <p><h4> Título </h4> <input type="text"…
-
1
votes1
answer64
viewsShow in PHP a query that is done directly in phpMyAdmin
I have a query ready (I didn’t do it) that every month I change the values of the months, copy and paste in phpMyAdmin (in the SQL tab) to run. She presents me with a very beautiful and structured…
-
1
votes1
answer85
viewsVariable sanitization X variable filter before insertion in MYSQL
I took a project to make some adjustments and noticed that there were some security loopholes in the database entries, I could not make changes to the querys but I could make adaptations, made the…
-
1
votes1
answer173
viewsSequelize Associantions
I have 2 models: user Features: const DataTypes = require('sequelize'); const database = require('../config/dbconnection'); const user= require('./user'); const user_features =…
mysql node.js join mariadb sequelize-jsasked 5 years, 7 months ago Guilherme Monteiro de Oliveira 21 -
1
votes1
answer148
viewsBreak lines in a text that comes from the database in a single variable
I’m having difficulty inserting line breaks in the text that comes as a response from a select in the database through an ajax request. $('select[name=tipo]').change(function() { var value =…
-
1
votes0
answers1407
viewsUncaught Error: Call to a Member Function fetch() on Boolean
I have a problem in a project. I can not solve, was running the same code until yesterday. Simply today, no longer works. I will send here the function that is a select in the database. Thank you.…
-
1
votes2
answers47
viewsPHP - I can’t update the database
I can’t update the database, someone can help me pfv? <?php $ligaBD = mysqli_connect("localhost", "root", "", "pap"); $tipo_autorizacao = $_POST['tipo_autorizacao']; $autorizacao_obs =…
-
1
votes1
answer265
views -
1
votes0
answers22
viewsRemove the underside of Radialgauge
I have a gaugechart where it was mounted at an angle of 180º, but it continues to show the 360º, thus occupying an unnecessary space. How can I remove that part underneath the chart ? Follow…
-
1
votes1
answer590
viewsDOUBT SELECT WITH INNER JOIN AND COUNT
Hello, I am relatively new when the subject and database and need to generate a report with the following information,: Client name Qty of purchases made by each customer Total in R$ of each…
-
1
votes1
answer2176
viewsERROR 1292 (22007): Incorrect date value: '0000-00-00' when changing table engine (Mysql)
I am trying to change the engine of a table of MyISAM for InnoDB, and it occurs that the column date_install generates errors due to zero dates: 0000-00-00. In this case, I used the following query:…
-
1
votes1
answer345
viewsHow to create Stored Procedures mysql with python from aqruivos . sql
I have some files .sql where I keep a procedure in each file. An example, procedure1.sql: DELIMITER $$ DROP PROCEDURE IF EXISTS sp_teste$$ CREATE DEFINER=`db`@`%` PROCEDURE sp_teste () BEGIN UPDATE…