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
answer155
viewsWhere part of Yii2 I connect to the database
In the Yii2 Framework application I’m using the "Advanced" template, I’m having difficulty making the connection. Where the framework is connected to the mysql database?
-
0
votes2
answers480
viewsReturn primary key after insertion into Mysql
I need to insert into my database two tables, one of the tables has a primary key and the other will use this value as a foreign key. My question is: How can I return the value of this primary key…
-
0
votes1
answer62
viewsSELECT following from INSERT
I need to insert the latitude of the city into the latitude of the vessel, so I did this. function cadastrarEmbarcacao($nome, $capacidade, $cidadePartida, $cidadeChegada, $horaViagem, $diaViagem){…
-
0
votes1
answer91
viewsHow do I pass the COUNT attribute in my sql string, since "COUNT" is a reserved php word?
Follows the string of select: $resultado = mysqli_query($conn, "SELECT COUNT(*) FROM conta WHERE username:usuario AND userpassword:senha";
-
0
votes0
answers184
viewsINFO: Error Parsing HTTP request header
When submitting a form, I was testing how much information I can send via HTTP. I am using Mysql DBMS. I have an application that runs several textarea fields. Example: a form with 10 textarea (I…
-
0
votes1
answer457
viewsChamp inconnu error dans on clause - SQL
I have the following situation, with 3 tables: ocorrencias: Has 6 columns: tipo_falha_1 until tipo_falha_6. It’s a two-digit code, from 1 to 20. tipo_falha: Has a description of the faults. The…
-
0
votes1
answer66
viewsProblem with SUM in Namedquery
I have the following NamedQuery: @NamedQuery(name = "Controle.listarTotais", query = "SELECT controle.prestador, controle.tipoPrestador, SUM(controle.valorLote), SUM(controle.valorPago),…
-
0
votes1
answer58
viewsHow to sort a list by current time and next dated records
I have the following table containing the schedule of the day of the week "Sunday" of a radio: (id,script,hora_ini,hora_end,link) I want to get the first 3 programs using as reference the current…
-
0
votes2
answers97
viewsForm system by base date how to pick up data in $_POST
how to format put returns between paragraphs for line break add 2 spaces at the end ► italic or bold indent the code in 4 spaces leaks of severe accents parecido _portanto_ highlighting placing >…
-
0
votes1
answer1528
viewsGet the month of the mysql datetime field
Colleagues, I have a table where you have the Mysql datetime() field. I would like to take a given month directly from the Where clause. By PHP I know how to do, but how would I do directly by…
-
0
votes1
answer264
viewsForm does not pass variable - MYSQL to PHP
I have a code called index.php, he must send the data to the post.php, to be stored within a database. I’m doing it through form. When I store the form fields in the database it thinks I am sending…
-
0
votes1
answer24
viewsHow to select records in a table using as reference the datetime present?
This select returns me the oldest records to the future. But I wanted to exclude from the results the events that have already passed and first display the current event. SELECT id, programa,…
-
0
votes1
answer199
viewsQuery does not return results in PHP
There is a query in my PHP where you search the email list and return to PHP, however, it is not returning any results. The PHP Code looks like this: <?php session_start("admin");…
-
0
votes0
answers200
viewsProblem setting value of a mysql BIT field
Use Java + Hibernate in my systems, I created an attribute boolean to determine whether a user is an administrator: private boolean isAdmin; The Hibernate generates tables and fields, and this isAdm…
-
0
votes1
answer54
viewsFormat last different Select Mysql result
I need to put the last result with a different format. as in a mysql table, for example. <a class="registro">Valor 1</a> <a class="registro">Valor 2</a> <a…
-
0
votes2
answers426
viewsHow to place database information in a select field in PHP
I have a page that connects in the database and brings information correctly, however I would like to put information in a form using the select field, but I’m having some difficulties if someone…
-
0
votes1
answer71
viewsUTF8 only works in mysql or only on the page
In Coon.php that serves as a connection to my database, if I add this code: mysql_query("SET NAMES 'utf8'"); mysql_query('SET character_set_connection=utf8'); mysql_query('SET…
-
0
votes0
answers24
viewsSelect option as per base date
I currently have a selection field where there are several options and only one that the user chose, only I wanted to search the one that he automatically chose by the database. I use the code:…
-
0
votes1
answer47
viewsUpdate record five minutes after insertion
I have a table with the following structure: tb_simulation: id(INT) | codigo(VARCHAR) | flag_valido(INT) | data_hora(DATETIME) | valor(DEC) I would like that five minutes after the record was…
-
0
votes0
answers28
viewsPage load equal G+
I’m taking a risk in PHP and making a simple administrative panel, without framework, to manage registered users, how can I load pages in the admin without reloading the side menu and the navbar…
-
0
votes1
answer465
views -
0
votes1
answer120
viewsSet Result Even If Record Does Not Exist
I’m trying to make a query where the table shows the column with the total 0 even if there are no records in that given status. For example: SELECT STATUS, COALESCE(COUNT(ID), 0) AS TOTAL FROM…
-
0
votes2
answers356
viewsRead TXT file on Rails
I have an application in Ruby on Rails and I need to read a particular file txt which will be sent by the user. After sending the file, the file data will be displayed to the user so that it…
-
0
votes0
answers72
viewsNull Field Error - Java Web
In the project I am studying is based on the book "Java Programming for Web" where a strange error occurs, then the error arises after filling the entire form, where it appears in the log that the…
-
0
votes0
answers291
viewsDoubt How to Recover Data in blob format and display in jsp
Good Staff I am with a very critical doubt I am not managing to recover the data from a field of my database that has the format blob I read some documentations but I could not understand very much…
-
0
votes1
answer1092
viewsHow to get the current date minus two years in mysql?
I need to show in a query some items between the current date of the time in question and two years before.
-
0
votes1
answer102
viewsSelect Mysql query used ports?
Personal I am needing to make a query from which return me the unused values, using 3 tables from which return me which ports are not being used in a network switch first table sw_local id, nome…
-
0
votes1
answer304
viewsInstallment for mysql
I am making a sales system in which 1 sale generates 12 installments for 3 users, being the seller, the manager and the supervisor, I would like to know the best method for storing these…
-
0
votes0
answers35
viewsError while uploading site in WORDPRESS
I developed a site in WORDPRESS and on my local server is working properly. When subbing it, I made all the necessary settings (change base URL in bd, configure wp-admin), only specifically one page…
-
0
votes0
answers898
viewsSQLSTATE[23000]: Integrity Constraint Violation
I have an employee chart and address. The address is receiving a foreign key from the employee, however, is giving the following error when I will insert: Exception 'Pdoexception' with message…
-
0
votes0
answers88
viewsPHP Mailer + Mysql
Hello, I have a page to fix that performs 2 functions from the completion of a form: 1-sends form information to Mysql database - working ok 2 confirmation e_mail with the data filled in the form.…
-
0
votes0
answers577
viewsUpload PHP file that passes data to MYSQL
It will be difficult to explain what I want but I will try to summarize in 2 small paragraphs. Come on I have a script that passes the file data .CSV and .TXT to the database MYSQL, but it only…
-
0
votes1
answer113
viewsForm with $_files does not save the file in the site folders
Hello my projector has a form where can be sent an image, it saves the form data in the BD but does not insert the image in the files. someone can tell where my mistake is? <?php session_start();…
-
0
votes2
answers141
viewsDatabase data by days of the week
I was thinking here and I couldn’t understand the way it would work. Let’s assume that I have 1 database with 10 post and in one column had "Day of the week" ID | NOME | DIA DA SEMANA…
-
0
votes2
answers495
viewsPython takes the first column value instead of the last one
I’m trying to get the last record of a column in Mysql but Python only returns "1", is an ID record with auto_incriment. I tried several ways, in some I was returned the whole column, in other era…
-
0
votes2
answers726
viewsSearch PHP/Mysql (show only result exactly the same as typed)
php collects input data using POST method. It is connected right, is searching, but when typing the UF and Municipality it shows me not only exactly what I typed, but also the related! type typed SP…
-
0
votes0
answers19
viewsMysqlworkbench - tabs
Hello everyone, I have a small problem. In the left tab, the banks that have been created no longer appear. I was wondering if someone could help me restore this window.…
mysqlasked 7 years, 6 months ago Romulo Sousa 569 -
0
votes0
answers107
viewsSelect that takes mysql database options
So I have this code here and I don’t understand why it’s not working. I’m a beginner in PHP and I can’t make it work. // a conexão com o banco está em outro aquivo, por isso não achei necessário…
-
0
votes5
answers3267
viewsPhp returns null JSON when it has accent in Mysql
Hello, I have the following code in php: <?php $con=mysqli_connect("localhost","user","senha","banco"); $parametro = $_GET["parametro"]; if (mysqli_connect_errno()){ echo "Failed to connect to…
-
0
votes1
answer64
viewsOmit beginTransaction commit PDO MYSQL
What happens in practice when I omit the begin transaction and the commit in a PHP script using PDO? I have a loading script, which processes school data, every school that finishes processing I do…
-
0
votes1
answer176
viewsDoubt Google Charts with Loop
Good morning, I’m using a Google Hart to create a dashboard, only that it’s only bringing me a result my loop isn’t working, someone could help me see what’s wrong ? <?php include("conecta.php");…
-
0
votes1
answer197
viewsMysql Connector problem in Rails
Talk personal, I’m not getting create a database for my Rails application it informs the following message : Error C: Ruby21-x64 Devkit Project>rake db:create DL is deprecated, Please use Fiddle…
-
0
votes1
answer193
viewsSearch for smallest integer available in Mysql
I would like to know if there is a possibility of creating a query that returns the smallest integer available. It’s a little complicated to explain, but with one example facilitates: id | codigo…
-
0
votes2
answers2001
viewsLogin system in java
So I made this code but it’s not passing, it goes straight to LSE even with the correct user and password. I made the changes and I instated the class where the checkLogin method is, but when I run…
-
0
votes1
answer224
viewsTotal SQL Records in all columns
I need to return the total query records in a column, even repeated, like this: However, the query is kind of boring. A query of 106 lines, with several SUM() and with a mandatory ORDER BY. I cannot…
-
0
votes2
answers45
viewsA separate city sql query
My Brand Sales Chart: City for which the sale was made, date and time of sale. I would like to pull all sales sorted by date and time, but with a specific separate city. For example: For sale 12 -…
-
0
votes1
answer88
viewsError in the data update method next to the database
I’m using the MySQL and Java in netbeans, but the SQL string code doesn’t update. I don’t know what might be wrong, because I’ve already checked sql and apparently it’s ok. I have in my class DAO,…
-
0
votes1
answer129
viewsColumn type for support table
I have a client table and would like to create a support table to avoid creating many columns (address, phone, phone1, email, Email1, Email2, car plate, mother’s name, etc.). The support table…
-
0
votes1
answer93
viewsHow do I print the html content of a div when I store the information in the database?
Good night, I have a system to control incoming and outgoing computer repairs what I want and when I store the information in the database soon after I gave it to print the html content of a div…
-
0
votes1
answer49
viewsPrevent duplication in the BD depending on the FOR loop
I am creating a multiple image upload system. The "move_uploaded_file" function works fine. The problem is that I included a $grav insert for the BD, and as can be seen in the code, it would only be…