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
votes1
answer3754
viewsERROR 1264: 1264: Out of range value for column 'Cpf' at Row 1 SQL Statement
I have a problem in Mysql, I created the following table: create table pessoas ( cpf int (11), nome varchar(30) not null, nascimento date, endereco varchar(30) not null, cep int(7), bairro…
mysqlasked 6 years, 6 months ago Tiago Ferreira C 21 -
1
votes0
answers40
viewsCompare data from two different Bds
Good morning, everyone, I have the following scenario: BD1 from third parties where I can only perform queries. I created a web page to display BD1 data, in case it would be a table where I have a…
-
1
votes0
answers347
viewsMYSQL - Detect sequential break with conditional
Hello I need help to make a query or process to detect gaps in a numerical field, I have a table of tax notes, which has a field num_nfe, it must follow a sequence, there can be no gaps in the…
-
1
votes0
answers302
viewsLaravel: how to insert in the database asynchronously?
I am developing a site in PHP, using Eloquent for database, and I have a certain problem of slowness in the time of the user to log in to the database. What I mean is... The user is taking almost 3…
-
1
votes1
answer121
viewsFiltering data in mysql
I have a table called tb_codes containing the following columns: Cod,txt1,txt2 I need to add the number of characters in the two columns txt1 and txt2, in the example below the character size is 6,…
-
1
votes2
answers262
viewsExtract exploded results from a column
I entered several data inside the same column with the implode, now I want to extract the results of the query with the explodes so as to keep the data separate so that later I can work them. I have…
-
1
votes1
answer13106
viewsError Code: 1136. Column Count doesn’t match value Count at Row 1
I’m trying to insert data into a table, but I’m not getting it, giving the following error: "Error Code: 1136. Column Count doesn’t match value Count at Row 1.", someone knows how to solve? I…
-
1
votes0
answers189
viewsImproving Modeling in an Order System
I developed a food ordering system, but I have doubts whether the way I modeled the database is the best in terms of performance and longevity (how the system was to behave with a lot of data). I…
-
1
votes1
answer205
viewsError when adding FK
I found just about this type of error in "Select", I followed all the restrictions but it didn’t work! Error from line : 86 on command - alter table tb_consulta add constraint…
-
1
votes1
answer534
viewsSelect Mysql with an array in a table
I have a table in the database called acting, in which generated the`s ID of the areas chosen by the user ex: 1,5,4,9,15 I need the result of the query in Mysql return me all users who have been…
-
1
votes1
answer737
viewsSave various data in Laravel
I have the following formula in my Blade, and now I want to save the data of each row in my database. How to save this data in Laravel? for ($i = 0; $i < 12; $i++){ var minhaData =…
-
1
votes1
answer118
viewsDynamic innerHTML in search results
Well, I’m developing a search field for an application, where the user type an address or name of an establishment and the system returns the results dynamically, but in the results I need to return…
-
1
votes1
answer522
viewsSplit array with multiple INSERT array_push in SQL
I have a foreach that makes the loop in the data of a file, this loop generates some values that are inserted in a array with array_push, I need to break these values inserted in this array to…
-
1
votes1
answer100
viewsQuery 2 SQL tables bring all the results
I’m doing an SQL query to bring users, but I consult 2 tables: users and users_vip No users have all users and users_vip only those who are vip (active or not). When I make my query joining the 2…
-
1
votes1
answer43
viewsSelect on condition
I have the following example table (tbl_Local) in Mysql: ID| LOCAL| COR 1 | A |RED 2 | A |RED 3 | B |RED 4 | B |BLACK 5 | B |WHITE 6 | C |RED 7 | D |BLUE 8 | E |BLUE 9 | E |ORANGE 10| E |YELLOW 11|…
-
1
votes2
answers349
viewsInvert id sequence in a table
I had to migrate a site that was made in pure PHP for Wordpress, searched the internet and managed to copy the data from the table of the old site to the structure of Wordpress, which happened one…
-
1
votes1
answer79
viewsSelect Mysql with 3 arrays
I have a Mysql table where the primary entries are 3 columns: YEAR, NUMBER and PORTION. The NUMERO column is a sequential numbering for each YEAR, but it is possible that for the same number there…
mysqlasked 6 years, 5 months ago Rafael Schaffer Gimenes 121 -
1
votes1
answer1300
viewsForm select with Laravel
I have this code working, but I wonder if there would be a more elegant way to write the following code in the view, through the Laravel formats: <div class="row"> <div class="col-xs-12…
-
1
votes1
answer55
viewsConsultation system
I have this form to consult only for a period of time or only by the client’s name or to consult for a period of time and a specific client: <form method="POST" action=""> <strong>Data…
-
1
votes1
answer34
viewsHow to recover data from a different Where SUM?
I have a work point timetable, which has the data_inicio, data_fim, usuario_id and extra indicating whether it is overtime or not. I already have a query that brings the sum in seconds worked per…
-
1
votes1
answer351
viewsReturn all results of a query with mysqli_fetch_array
Hello, I am trying to implement a block scheduling system where the user chooses the date and location of his preference. After that, he will choose the times according to availability and need to…
-
1
votes0
answers141
viewsHow to assemble an online comic viewer?
Good evening, everyone! I’ve always worked with frontend and very little with php and mysql, but decided to make my personal comic site. A picture of my page: Each image is a material link in the…
-
1
votes1
answer597
viewsSpringboot - JPA - does not migrate relationships in the entity and relationship diagram
I am creating a Rest application using Springboot, JPA and as a Mysql database. It works well, but it has something strange when I enter the database. I used Workbench to create the relational…
-
1
votes1
answer895
viewsHow do I pick up the location of a marker and store it in the database using google map?
I have a marker on my map, it is "draggable", I would like to know how I can find the latitude and longitude of this marker, and later store in the database. I read the google map api documentation…
-
1
votes1
answer243
viewsSave more than one PHP and MYSQL record
How do I update more than one record, for example appears on the page notes.php the following information: This information is from a bank, so are different ids each student. My problem is when I…
-
1
votes0
answers80
viewsDownload database data in csv format
I am trying to download the database data in csv format but it is indicating that the SQL syntax is wrong. public void exportarBaseRespostaPI() { String banco = "b2wentregascorreios"; String tabela…
-
1
votes1
answer38
views -
1
votes1
answer179
viewsConcatenate two functions! (Mysql/PHP)
I have two functions I’ve done to display data in a table. However I was not able to create this function in a single function, so I created two, however, when I call both in the "foreach" it is…
-
1
votes1
answer66
views -
1
votes1
answer187
viewsPHP does not give error, but also does not register correctly
I have a login, that if the user logs from another cell phone, I register in my BD the new playerID (onesignal) it. The login works perfectly, but does not register the new playerID. And no error,…
-
1
votes1
answer484
viewsUpdate PHP variable with Jquery using AJAX request
I have a problem related to HTML, Jquery and PHP, I will try to pass the most information. I have a PHP page that has to go back and forth with variables and it’s like a step by step, where each…
-
1
votes1
answer480
viewsSubquery returns more than one value
When performing an update within a precedent, the message appears saying that the comparison subquery brings more than one result. The subquery has been tested and brings only one result, since it…
-
1
votes2
answers705
viewsSQL Error: Can’t reopen table
I have a problem when performing an SQL using a temporary table. I need to bring the data da ultima alteração where the opportunity has been changed. However, this date comes from several tables for…
-
1
votes1
answer2068
viewsMultiple PHP uploads and insert several images into the mysql database
It may be duplicated, but I couldn’t find any explanation that follows in my reasoning. I have the following code taken from the Web, through a video lesson. <form class="form-horizontal"…
-
1
votes1
answer49
viewsProblem with tables
I’m trying to make a series site, only I’m suffering to hit the logic of the tables, first I’ll explain how I want it to work, the person enters the site, there are the series that pulls the…
-
1
votes1
answer298
viewsHow to return the sequence of the week in the reported period?
Good morning, I need to return the sequence of the week of the month (of the reported period) in two fields, initial and final date. In PHP and MySQL. Currently returns the week number in the year,…
-
1
votes1
answer153
viewsError doing Many to Many interface with Spring Boot
I’m trying to make a phone call Many-to-Many between classes usuario and permissao, using the documentation of Hibernate as reference . But when I try to generate a class JSON file usuario the…
-
1
votes1
answer367
viewsGet the name of the respective PHP table in SELECT UNION
Hello, everybody all right? Does anyone know how to get the name of the respective table of the pulled value? I have the following code: $query= " SELECT DISTINCT titulo, categoria, views FROM (…
-
1
votes1
answer304
viewsOffset and limit Mysql problem
When performing a query using limit and offset the database returns a line less than it should. What’s the problem? Cache? Lock? Index? Dice? For example: select distinct(id_table1) from table_1…
-
1
votes1
answer343
viewsInsert multiple type file records into Mysql
I’m making a form, where have a part of image registration for a photo gallery. In this field I use a script with an add field button so that a new field can be inserted for each photo…
-
1
votes1
answer245
viewsMysql comparing a number with string returns true if the string starts with the number
I have the following table in the database: idUser - Username - Group 1 - John - 5GR 2 - Donate - 1GR And the following query: SELECT * FROM `table` WHERE `idUser` = '$name' OR `Group = '$name'…
-
1
votes1
answer277
viewsDoubt about highcharts and php
For styling a web page, I usually use highchart charts with information from a mysql database via php. For those who are not familiar with highcharts, here is a simple code example.…
-
1
votes1
answer65
viewsError picking radio input data
Guys, I’m having the following problem sending the form: Follow part of the form code and validation: <div class="form-group"> <label for="sexoFunc" class="control-label…
-
1
votes0
answers64
viewsValue duplication when importing file . csv when one or more column(s) is missing from the file
When I import a . csv file to save to the database and the file is missing the name of some column instead of inserting null in the bank it repeats the value of the first column. Following example;…
-
1
votes0
answers37
viewsBank query problem with Codeigniter
I have a table in the bank (use_shopBlock), which locks a button in the view, but when I give a <?php var_dump($shopBlock);?> the result is NULL. My view: <?php $shopBlock =…
-
1
votes2
answers42
viewsPHP - Latest Selection Question
Good, I created a crypt that shows all user messages limited to 3. My object is that messages show like this each time they are recent. MSG hora: 12:30 - OLA MSG hora: 12:31 - OLA MSG hora: 12:32 -…
-
1
votes1
answer31
viewsDatabase data for web page
I needed help because I wanted to send the data from my database to the website BASE FIELDS: Id_Produto, NomeProduto, PrecoProduto,DescricaoProduto, QuantidadeProduto, CategoriaProduto - TABLE NAME:…
-
1
votes1
answer158
viewsDifferent coding problem when recording data via PHP project or direct from Mysql
Friends, all right? I’m learning about PHP and when testing connections with Mysql I noticed a curious problem: If I am using phpMyAdmin and through it insert records, with accentuation, in my table…
-
1
votes2
answers973
viewsHow to build a JSON structure?
I have the following JSON: { "status": true, "msg": "", "frete": [ { "Transportadora": "Correios", "Tempo": "16", "Msg": "", "Codigo": "04510", "Servico": "PAC", "Valor": "131.30" }, {…
-
1
votes1
answer312
viewsSelect without repeating data
I am developing a website for a musical project and I am having difficulty with select, is the following, I have 2 tables an album that contains information from the cd (artwork, album title, name…