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
answer46
viewsDecoding Mysql - Javascript
Good afternoon, I have a database in MYSQL that returns processing information. ELSE IF(linhas_banco_in_p <> 0) THEN SET msg = 'ESSA CONTA E AGÊNCIA JÁ EXISTE NESSE BANCO, VERIFIQUE AS…
-
0
votes1
answer49
views -
0
votes1
answer135
viewsWhat’s wrong with Rigger?
I have this table: create table alecrim( id_alecrim int not null auto_increment, sem_epi int not null, p1 smallint, p2 smallint, p3 smallint, p4 smallint, p5 smallint, p6 smallint, p7 smallint, p8…
-
0
votes1
answer337
viewsCheck database changes correctly
I need to check changes in my database and create a script that sends requests every millisecond by calling a function that returns the number of lines in that database, but I realized that it is a…
-
0
votes0
answers82
viewsModify database access data in the app.config file after running the project’s "Publish"
Hello, I created an application in C# and for access to the database I did the following procedure: In the app.config file I created the following: <add name="MyDatabase"…
-
0
votes1
answer271
viewsGroup Month according to Between
I created a statement in Mysql to display a graphic report, I wanted the months to be displayed from the month informed by the initial date to the month of the final date. But in my SELECT it groups…
-
0
votes1
answer174
viewsFactory error when using @Embeddable in JPA
I need to create a composite key on my system, after researching a little discover that I should implement @Embeddable, even fine, I added the class on my system implementing the keys, but when I…
-
0
votes0
answers177
viewsGenerate random number with repeat rule
I need an SQL command that generates a random number between 1 and 11, and that for number 1 is generated more often than others. Currently I use the following command: FLOOR(1 + (RAND() * 11)) It…
-
0
votes0
answers64
viewsDifferent results between localhost and server
I have the query below that works well on localhost but when send to the server does not work What can it be? SELECT CONCAT( mes, '/ ', ano ) AS data, IFNULL( SUM( total ) , 0 ) AS Total FROM…
-
0
votes1
answer133
viewsPlace Variable inside Formdata
How can I put a jquery variable inside Formdata? Example: I have a CKEDITOR, but I am not able to save in the database, but I am using the format of sending with ajax, I found on a website, to…
-
0
votes1
answer43
viewsdoubts with Mysql somatorio
I have the following tables the contamov table, may have several low of the same record of the crecpa table. need Select records from the crecpa table and the sum of the low (value field) of each…
-
0
votes1
answer26
viewsMy codeigniter is using another database instead of the one I selected
I have 2 projects, one is the copy of the other, one I want to leave online and the other test for me to program on top, so I copied the database and copied the project, changed the name, changed…
-
0
votes2
answers827
viewsphp error with mysql and mysqli
I’m kind of new to programming and I’m having a hard time, I was programming a site and running it on wampserver, but from a while I updated the wamp version and the php MYSQL commands stopped…
-
0
votes1
answer26
viewsPHP does not think Session
Hello! I am logging in with Jquery and PHP, the connection is right. But when I soon instead of staying on a page he doesn’t find my session and sends me back to login. My HTML: <h2…
-
0
votes1
answer109
viewsDuplicate result in Mysql in while
The table has two columns, one of user data and another of user points, the user points works like the bank statement scheme, but need to return only the last value, and I did so SELECT `usuario`.*,…
-
0
votes2
answers719
viewsBring repeat records from 3 columns in the same table
I have a table with transport voucher data of my company employees: nome ! valor1 ! valor2 ! valor3 teste1 ! 6.50 ! 0.00 ! 0.00 teste2 ! 4.30 ! 2.80 ! 1.10 teste3 ! 8.40 ! 1.10 ! 0.00 teste4 ! 2.85…
-
0
votes0
answers325
viewsError starting Mariadb in Centos7
Good morning. I have a dedicated server running Centos7 and Mariadb stopped and I can’t restart the service. [root@new ~]# mysqld start 2018-01-17 13:31:10 140236707752192 [Note] mysqld (mysqld…
-
0
votes1
answer61
viewsLaravel, problem with Float fields
Hello, I am using Laravel and need to make a select in a table, also create a field that brings the result of a function. my select is like this: return \DB::table("view_pins_ocorrencias")…
-
0
votes1
answer802
viewsSQL Error (1093): You can’t specify target table 'import2016' for update in FROM clause
I am running this PROCEDURE, and it returns this error! BEGIN SET @cont = 0; REPEAT SET @sqlstring = "UPDATE import2016 SET coluna4 = (SELECT coluna4 FROM import2016 AS a WHERE a.coluna2 ='' and…
-
0
votes1
answer68
viewsQuery "escape" handling (character escape)
Setting: Query of insertion: public function forward($descricao) { ($descricao == '') ? $descricao = 'NULL' : $descricao = "'{$descricao}'" ; $sql_enc = " INSERT INTO rg_encaminhamentos…
-
0
votes1
answer475
viewsCreate Array using SELECT output
public class TelaGrafico extends javax.swing.JFrame { Connection conexao = null; PreparedStatement pst = null; ResultSet rs = null; /** * Creates new form TelaGrafico */ public TelaGrafico() {…
-
0
votes0
answers32
viewsget_where to PDO
I want to change get_where to mysql or PDO, but I don’t know! Help ...! public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL) { if ($table !== '') {…
-
0
votes0
answers251
viewsImage does not appear - php
I’m trying to bring the Mysql database image to a PHP page but it doesn’t appear. Follows the code: <!doctype html> <html> <head> <script src="jquery.js"…
-
0
votes1
answer84
viewsView day selection with php and Pdo
On this page I’m making birthday of the month, and I was able to display all the birthdays that have in the current month, but I’m not able to display the day and I also selected in the database...…
-
0
votes3
answers227
viewsrandomly generate for a period of time in php
I have this code: <?php $array_number = array(); for($i = 1; $i <=11; $i++) { $value = rand(1,11); while (in_array($value, $array_number)) { $value = rand(1,11); } $array_number[$i - 1] =…
-
0
votes1
answer387
viewsList mysql data in a modal using php
I would like to list a field that is in the database in a list that is already created. When the user clicks on the "title" field he has to call a modal with some database data. What happens, it…
-
0
votes1
answer209
viewsInsert data from one table into another by comparing ID
In my system I have two tables, one with user registrations, obviously, each one has its ID. And another table where are placed the data sending gifts from one user to another, but only appear the…
-
0
votes1
answer137
viewsError uploading mysql container (with volume)
Good evening. I’m learning Docker and can’t move up a Mysql container when I add a mapping volume. Follow the errors and the Docker-Compose.yml file below. I am using Docker Toolbox in Windows 10.…
-
0
votes2
answers1034
viewsMeasure distance from multiple points using Google
I’m working on an app where the user can see the closest establishments to it. In the bank I keep the latitude and the longitude, and in mobile I recover the user’s position. I made a LIMIT in SQL…
-
0
votes1
answer39
viewsGoogle API does not auto complete in bank
I’m using the Google API on an html page to get the user’s location. When the user type EX: Bon Street ( will appear options for him, there for example he clicks on Bonnard Street ... ) in the text…
-
0
votes1
answer265
viewsCompare two totals using LEFT JOIN in Mysql
I have two tables: Venda and ProdutosVenda, where the table Venda has a field named 'Id_key' and the ProdutosVenda, that will store the products of this sale, has a field called 'Id_referencia',…
-
0
votes3
answers103
viewsGet the same result from a query with Join
I have researched on some forums, consulted my books and looked in other sources, but I did not find anything to solve my problem. I have a query that queries the open value in a given table: select…
-
0
votes1
answer29
viewsQuery problems in mysql
Good afternoon. I have a query in my db that has to bring the user name data and his id of the users table and the commission table brings the commission , prize, month, and a month field consisting…
-
0
votes0
answers40
viewsQuery - SQL Server with Stuff
Guys, in the query below I want you to bring it in the following way. contato andreia, marcos, juliana that is, on the same line. In the consultation, I used the stuff, but without success. Today…
-
0
votes1
answer61
viewsProblem showing result in php when there is only one entry in the BD
The code below returns some value, when there are several records with the same or similar name, when there is only one record in the bd does not return the value of that record. <?php…
-
0
votes1
answer401
viewsError while saving records in the database
I have a normal form with a normal page to import the information to a normal bank table, but for some reason it falls straight into the die and does not save the information. Form: <form…
-
0
votes1
answer738
viewsInsert a value into the SQL table for each selected checkbox
I have a form with a checkbox group (equal below) and would like when selecting the values, insert a row in the SQL table for each selected checkbox: <form> <input type="hidden"…
-
0
votes1
answer50
viewsSQL grouping information
I have the following sql statement: SELECT * FROM TB_CADPRECO WHERE MAT_GESTOR = 123 AND UF_PRODUTO LIKE 'PR' AND TIPO_CAMPANHA = 5 AND DT_CAMPANHA = '01.08.2018' UNION SELECT * FROM TB_CADPRECO…
-
0
votes1
answer115
viewsLimit registration permission system
In my course system, the instructor has to stipulate the number of students who can enroll in each class and the student will only be able to enroll if the number of students enrolled is lower than…
-
0
votes2
answers374
viewsInput fields are not being filled in according to value
In my system there is a page with a form that registers an order and another page with a table that shows all registered order records. Each row of the table has a request and an edit button that…
-
0
votes1
answer520
viewsHow to Join with Sum and Group By
I’m trying to do an SQL search using Join between two tables. The first table is a table containing monthly savings values for a given project. Each time someone registers a project on the site, a…
-
0
votes1
answer78
viewsHow to verify variable has values?
I have a function that performs a select on the bank: function selectIdProdutos($id){ $banco = abrirBanco(); $sql = " SELECT * FROM produtos WHERE id = ".$id; $resultado = $banco->query($sql);…
-
0
votes0
answers85
viewsUnhandled Exception: System.Typeinitializationexception
MySqlConnection sqlconn; string connsqlstring = "server=localhost;user id=sql10217362;persistsecurityinfo=True;database=sql10217362 --debug"; sqlconn = new MySqlConnection(connsqlstring);…
-
0
votes0
answers67
viewsRegistration using PDO, error 22527?
I have this PHP code below that will be executed after the form Submit to register in the database. If you go through validation, a new user will be created and hashed and then entered into the…
-
0
votes1
answer51
viewsSearch in Mysql using day, month or year only with PHP
I created a table, in it a field in the format DATETIME to store the day, month, year and time in which a record is made. I wonder how I can do to search only using day, month or year ? Example: I…
-
0
votes2
answers231
viewsInserting date in American standard
I have a function to import data from a txt document, the layout that I use to import this data is delimited by semicolon, I have the following columns (number, data_inclusion, sender, currency,…
-
0
votes1
answer110
viewsDoubt - UPDATE MYSQL with PHP
I need to update in mysql database but I can’t. Basically I’m following the following steps: taken bank variables that are similar to a given CPF and display 2 people The user will click a button to…
-
0
votes2
answers149
viewsPHP how to let select set
I have a select that takes the data from the database to make an insertion: <div class="row"> <div class="form-group col-md-2"> <label for="marca">Marca</label> <?php…
-
0
votes2
answers44
viewsQuery in mysql does not work
I need to present a report and my query is this: SELECT f.nome, count(hv.id) as qtdvendas, sum(hv.total) as totalvendido, sum(iv.valor_venda - iv.valor_compra) as lucrototal,…
mysqlasked 6 years, 10 months ago Jasar Orion 2,233 -
0
votes0
answers27
viewsPython: Rescue mysql html text
I am using Bottle.py for study and testing... I have a problem in retrieving a database information. The table is like this: create table if not exists postagens ( idPostagem INTEGER NOT NULL…