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
votes1
answer52
viewsSQL error in fullcalendar connection
My code is returning false, I’ve debugged but I can’t find the error he returns "There was some problem.." <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8">…
-
2
votes2
answers116
viewsDifficulty returning the result in a single query without duplicating
I am trying to assemble a query (MYSQL) to return me all the clients that a particular seller can view. The rules to show the list of customers for this seller are: - Customers with contracts…
-
2
votes1
answer105
viewsSelect columns in different tables
I am using Laravel 5.3 and would like to use columns of two different tables related to foreign key: For example: Client table id | nome | end_cep 1 | carlos | 69084555 2 | Maria | 69088555 Address…
-
2
votes1
answer1322
viewsSelect grouping by average hour and sum per day
How can I return in a select the daily sum of the value column, Since before adding up I have to average an hour? My table receives the "value" once a second, I need to make the average per hour of…
-
2
votes2
answers3764
viewsmysqli_select_db() expects Parameter 1 to be mysqli, string Given
I have a problem here with Mysql, is giving errors, I’ve made all kinds of changes. I’ve tried to change the Mysql function to Mysqli and only increase errors. Code: <?php $sql["host"] =…
-
2
votes2
answers48
viewsHow to recover the last payment?
I have the following table in my bank: "financeiro financeiro_id INT AUTO_INCREMENT, financeiro_pagamento DATE, financeiro_pid INT, financeiro_valor INT, "; In this table I record the payments that…
-
2
votes1
answer575
viewsHow do I display table data (HTML) from a database through JSON Express?
Hello! I would like to know a way to present to the user in an HTML table, data stored in a MYSQL Database with connection through JSON Express. const express = require('express'); const app =…
-
2
votes1
answer280
viewsMedium in Mysql database
People I have the following scenario in the database: Tables: mdl_question_attempts (slot, questionid, rightanswer, responsesummary) mdl_quiz_slots (slot, quizid, questionid) On the table…
mysqlasked 7 years ago Miguel Silva 437 -
2
votes1
answer310
viewsError: 1215 cannot add Foreign key Constraint -Mysql 5.7
I am trying to create a table but I have a problem in a foreign key, at least it seems and is what I could understand in my research. Look at the code please, the error occurs in the last table. (I…
mysqlasked 7 years ago Jhonatan Teodoro 37 -
2
votes2
answers343
viewssubmit a form when selecting a select option, without re-loading the page
I need to submit the data of a form (are Hidden) when selecting the option in select, this with ajax without page Reload. I have the following code, which works well but does not send (POST) the…
-
2
votes0
answers193
viewsForeign key does not work! MYSQL
Good afternoon guys, could someone help me? My Foreign key is not working in a database. I had already made a Foreign key in another database the same way, but now it is not working without apparent…
mysqlasked 7 years ago Diego H. Seto 89 -
2
votes2
answers857
viewsGroup By By Data
I have a table called tsc, with the properties ID and DataHoraOcorrencia. I need to check the amount of ID for DataHoraOcorrecia. SQL SELECT DataHoraOcorrencia as DataHora, COUNT(tsc.ID) as…
-
2
votes1
answer382
viewsError c# and Mysql: Authentication with old password no longer supported, use 4.1 style passwords
Context: We have an application built a few years ago in ASP 6 that accesses a Mysql database, there on Localweb. To make the connection, the application uses the Mysql ODBC 5.1 driver. and works…
-
2
votes1
answer768
viewsAdd values from a table field
I have a table where I store the freight values, but when the cart is updated with the freight value, this value is also updated in the table. But if order #1111 has 3 products in the cart, it will…
mysqlasked 7 years ago user24136 -
2
votes0
answers249
viewsError while connecting Mysql using .NET. How to resolve?
Exception when connecting to the bank: Ispasswordexpired: 'Conn.Ispasswordexpired' threw an Exception of type 'System.Nullreferenceexception' Serverthread: 'Conn.Serverthread' threw an Exception of…
-
2
votes1
answer800
viewsUpload images larger than 2mb
I have a simple system that uploads the image to a folder and writes the name and url to the database. But when I select an image larger than 2mb of the error in the target vaiavel that is equal to…
-
2
votes1
answer143
viewsMethod does not return true Boolean even if it is positive
I am with a project account that makes a deposit, however I am not able to return a true even it finding the value in the database this my Class method counts public boolean depositoConta(double…
-
2
votes1
answer150
viewsAre there classification metrics for the elaboration of SQL queries?
Doubt Have some method to sort in difficulty levels, an SQL query in easy, medium or difficult? This question may be a little subjective, but speculating may be a good option. Context I was…
-
2
votes1
answer218
viewsInsert Mysql syntax error
I can’t resolve the error below: Notice: Undefined index: Html_cor_task in C: Users User Desktop pi Fe Order2 Cadastrataefa.php on line 14 You have an error in your SQL syntax; check the manual that…
-
2
votes1
answer162
viewsMysql problem with empty column query
I have a Query where I give a select with INNER JOIN between two tables (contacts and company), I have a field called id_company where I search in the companies table to find the company name, but…
mysqlasked 6 years, 12 months ago Diego Braga 319 -
2
votes2
answers2825
viewsEmail confirmation of registration
I signed up with Cpf and email. I already put to validate Cpf and such, and I can send the email to the user who put the email there, but I need the registration to be done only if the email really…
-
2
votes2
answers1061
viewsWhat are real and practical examples in the use of Stored Procedures?
When participating in an interview for the position of developer, I come across a question related to Stored Procedure (SP) and at first I have theoretical knowledge on the subject, but I have never…
-
2
votes1
answer87
viewsPagination at the end of the page
I have a system in which shows 8 data per page, my problem and that when pagination has only one data on the page or 2 is on the data side, like: data 1 - data 2 - Page 1, I wanted it to be at the…
-
2
votes2
answers381
viewsOptimization, speed in select, and PHP code
Following the reasoning of this question, i made this method, where I select several users at once to return me only 1 in random order, ie, my query that is in the function does a scan on the whole…
-
2
votes1
answer9584
viewsSyntax error sql, #1064
I’m trying to create a table in my phpmyadmin database. SQL CREATE TABLE IF NOT EXISTS 'chat' ( 'id' int(11) NOT NULL AUTO_INCREMENT, 'time' timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 'username'…
-
2
votes3
answers1645
viewsSearch Database By Selecting Select Options
good morning. I have a little problem I’m having trouble solving. The situation is as follows: I have 2 selects (State and city), I would like that when selecting a state the system did a search in…
-
2
votes1
answer270
viewsDoubt in consultation Groupby and Checkbox - Laravel 5.5
I am developing in PHP in Laravel Framework 5.5 and have the following code to create my checkboxes. {{-- percorrendo a tabela para exibir os checks--}} @foreach($permissoes as $keys =>…
-
2
votes2
answers179
viewsAjax return a results loop
I am making a financial system with ajax, both revenues and expenses have "descriptions" and to edit the information of a recipe I call her information but I have to pull the descriptions tbm.…
-
2
votes1
answer37
viewsCan you select several tables with the beginning of the same name?
At the base base_suporte, there are tables with user token and support token suporte_tokenUser_tokenSup. On the general support page, you need to show all the supports, this part is finished and…
-
2
votes1
answer513
viewsGrouping Data Preferably-MYSQL
I’m trying to group equal lines, but based on a value. I know it’s possible through a sub-query, but how I’m using inner join I couldn’t apply. SELECT * FROM Concessionarias C inner join…
-
2
votes1
answer988
viewsEdit select by displaying bank value and showing other table options
I have the table that registers a user (gr_entity) and has a link with a user status table (gr_entidade_status). I want the editing form (editando_user.php) to show the value that is in the…
-
2
votes0
answers44
viewsHow to execute an SQL statement concatenated with a variable in a Procedure in Mysql
I am creating a database to create a database and some tables within that database. I get the name of the database to be created by parameter. I’m having difficulty concatenating this parameter next…
-
2
votes2
answers120
viewsRetrieving database data and calculating inputs
good evening I’m having a hard time performing a data recovery on I recover but wanted the recovery to be simultaneous I will explain better and once you see the code you will understand.…
-
2
votes1
answer640
viewsLoading login data into another domain
in the system I am making there are 3 panels, being a table of users for each panel and the public site. When the user logs in to any of the three panels, and re-accesses the public site, more…
-
2
votes1
answer616
views -
2
votes1
answer288
viewsLoad data into a div table within a form
I have this form: <form name="form4" method="POST" onsubmit="return form_validation()" > <h1><center><strong>Saída de…
-
2
votes1
answer420
viewsBest way to generate Holerite, I seek a more viable solution
I developed an application that generates Holerites, and for this I need to process data from 4 tables. Employees -> Companies -> Salaries -> Discounts I want to show my user the following…
-
2
votes1
answer40
viewsI have many INNER JOIN in the query, can you minimize?
I have a query in a database that uses several INNER JOIN and I realize that in some moments the system slows down in this request, has how I reduced it? Below follows explanation of my structure…
-
2
votes0
answers39
viewsHow to use two arrays to make a query in the bank?
I’m using the Google API, the Cloud Vision, to analyze an image and return me through the labels, which brand/model of a car, for example. Using the image below, I have the following feedback: [car,…
-
2
votes1
answer415
viewsView data display with Codeigniter
I’m trying to present the data from my View database. I followed the various tutorials I found on the internet but none of them could meet me :/. Model public function get_titles() { $title =…
-
2
votes2
answers266
viewsSelect returning dates in the object other than what is registered in the Mysql database
I have a problem when I list the contents of a table and store in a list the date is one day less. I’ve done a lot of research on the web and can’t find a solution to the problem. Below the method…
-
2
votes2
answers1017
viewsMultiple insert with php PDO and Mysql
My situation, A post form with a text input and two radios inputs. Inputs are named respectively, nome[0] and tipo[0]. When one adds more form fields I put one .attr to stay nome[1] and tipo[1]" and…
-
2
votes2
answers127
viewsDoubt in Mysql query
Query that I am using SELECT os_id,os_data,os_processo,os_solicitante,os_tipo,os_cliente,os_empresa,os_adverso,os_local, os_comarca,os_advogado,os_preposto,os_documentos,os_status,login_nome,…
-
2
votes1
answer684
viewsWhat is the best way to record a user log?
I have a small monitoring system that aims to show if the data of some servers are equal to backups. As the system interacts directly with the database, the need arose to know who accessed and when…
-
2
votes1
answer854
viewsSelect from time to time
I’m trying to ride a sql to check if there is any record between times informed but not leaving, I did some tests but unsuccessfully. For example, a bank record containing these two times, as…
-
2
votes1
answer689
viewsRemove accents from an array
I have a select in which it is completed through a bank query: <select class="form-control" name="select_cidades"> <option>Selecione a Cidade</option> <?php $result_cidades =…
-
2
votes1
answer153
viewsPlace euro symbol in a table
In my consultation I have two column where I do the sum of hours and the sum of the amount to be paid by the client in those hours: Line summing the hours: CAST(SUM(SEC_TO_TIME(E.teste1))/100 AS…
-
2
votes3
answers86
viewsProblems with SELECT RIGHT JOIN
I have two tables, A and B. Na Table A, I have a column with names of machines (Cutter, Baler, Packer and Rewinder) and in the other column some causes that made them stop (As Lack of Electrical…
-
2
votes1
answer93
viewsWhen entering a record in Pag1, update the pag2
Good Morning. This is a conceptual doubt. I never needed it, so I don’t know if it works. Imagine the following situation: I have a script A, where I insert information into the database. This…
-
2
votes2
answers650
viewsProblem with Mysql Inner Join
I’m trying to create a query to bring results that are in different tables in the Mysql,3 but I’m not getting it. I have experience in JOIN in the SQL, but I’m picking up a little bit to do in the…