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
answer839
views -
0
votes1
answer138
viewsI can’t do Insert with array
I have a form with the following elements: <form name="dadosLocacao" action="registra_locacao.php" method="POST"> <div class="form-group"> <label for="filme">Filme</label>…
-
0
votes1
answer6454
viewsReceive array method POST form
Good afternoon, I’m trying to receive a Form as an array, but I’m not able to properly manipulate this array. I have 6 fields 3 fields ID and 3 fields text , I tried to do so but without success.…
-
0
votes1
answer64
viewsWrong time recording
I own these 3 classes as a model. Object: import java.io.Serializable; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity;…
-
0
votes1
answer569
viewstable dynamic javascript write in mysql database
How do I take the table inserts and write to the database ?. Follows my code. function addItens () { // Elemento textarea: const texto = $("#texto"); // Elemento table: const table =…
-
0
votes1
answer158
viewsHow to echo the value of a variable from the query result
To automate my process of generating one JSON, i save the variable name in the database (Ex: $teste_value_1). In my php file. i have the value of this variable, for example $teste_value_1 = "Isso é…
-
0
votes0
answers36
viewsError when registering data in the database
I’m having a hard time getting some data into the database. When I click to register the message appears at the end of the code "error when registering". I’ve reviewed the code and I’ve reviewed the…
-
0
votes0
answers36
viewsLoop in Json [PHP and MYSQL]
I have a data visualization page from a bd table, one of the cells in this table in html is actually a loop. I want to make the inline edition, which I’ve used in other projects…
-
0
votes0
answers45
viewsSelect location from status
I have the following structure (fictitious) Status table: id | name | status Table location: id | title | estado_id In my front-end I have a navbar which will list the states and in each state the…
-
0
votes0
answers53
viewsAJAX does not update div by id
I am developing a login system, where I need to return the validation message to the user in a div on the login page itself, however the error message is appearing on the validation page. I’m using…
-
0
votes1
answer138
viewsSelect JOIN + AVG() - Doubt with feedback
I’m solving an exercise but I’m having problems in return: Question: Write the query that returns the supplier’s code, the supplier’s name, the number of products per supplier and the average price…
-
0
votes1
answer36
viewsError in consultation
What is wrong? I did everything right, researched and resumed the mistake: Notice: Trying to get property 'num_rows' of non-object in C:\xampp\htdocs\tipo\consulta-online.php on line 21 What can it…
-
0
votes1
answer668
viewsMysql - Sort before grouping
I need to make a selection that brings the last users who logged in, without repeating the names. The problem is that the command below first groups and then sorts: SELECT usuario FROM tab_logins…
-
0
votes1
answer22
viewsAverage mysql with multiple conditions
I am mounting a graph containing the amount of CHATS that were answered in a given time, example: 1-30s -> 20 chats answered 31-60s -> 66 chats answered 60-120s -> 4 chats answered I’m…
-
0
votes0
answers82
viewsHow to ignore a "Duplicate entry error" in MYSQL and insert the remaining un-duplicated
How to ignore a exception and insert the rest of the fields when I get this error in MYSQL using mysql . NET Connector? Mine try catch is as follows: try { conexao.Open(); MySqlDataReader reader =…
-
0
votes0
answers278
viewsAlternative to using UNION in mysql/php
Good morning, I am doing the sum of the elements of a column (I called Minhacoluna) in function of another, called "turn". There are three values for turn, so I need the code to return three…
-
0
votes0
answers58
viewsAdd Mysql Subquery
I have the following query to get Notapt (category = 3) how can in the same query get the Notamt (category = 11) I am trying so, but I get the same value for Notapt and Notamt, below code and output…
mysqlasked 6 years, 8 months ago Miguel Silva 491 -
0
votes0
answers283
viewsAdjust listview width for input from mysql database Vb.net
I have a problem to adjust the width with listview in VB.net, where the data loaded from the database does not adjust the width. Example: Have a database record that has a width of 250 characters…
-
0
votes0
answers20
viewshow to receive dynamic data from a form and write them to the BD
my difficulty happens because I created a dynamic grid where I have sequential lines for product inclusion, so I don’t have the names of the traditionally fixed input. In this case I’m assigning…
-
0
votes1
answer50
viewsHow to relate the same table without conflict?
I have a user table, and a likes table. The table of likes has: usuario_curtido and usuario_curtiu. When I execute select u.usuario_nome from usuarios u JOIN te_curtidas_usuarios c ON…
mysqlasked 6 years, 8 months ago Daniel Bonifácio 951 -
0
votes0
answers270
viewsCategories and subcategories in a single SELECT
I have the following table structure: CATEGORIAS id titulo SUBCATEGORIAS id id_categoria titulo I was wondering if there is a way to bring all categories and subcategories at once into a single…
-
0
votes1
answer37
viewsMysql search with only one of the selected fields
I have a question about how to organize this information, I have two selects in my code, that the user choose both it, generates the table searching who has the two information, however I would like…
-
0
votes3
answers1595
viewsHow to pass code (id) through my viwer using Thymeleaf and spring mvc for the controller?
My entity: package local.demo.models; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import…
-
0
votes1
answer66
viewsChart display on page
I have this chart with the following query to the database: <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script…
-
0
votes2
answers49
viewsHow do I count the amount of items in a repeated field?
I have a table with the Ctrlcarganum field that has a record of the cargo number of a truck. I need to make a consultation that brings the total of this field. Until I could make the consultation…
-
0
votes3
answers336
viewsRepeat loop json php mysql
I get a json via php post, and want to insert the information into a table in mysql database.. json{ { "todos": [{ "nome0": "andre", "cor0": "preta" }, { "nome1": "felipe", "cor1": "azul" }, {…
-
0
votes0
answers70
viewsError 1215 Mysql
First of all, I would like to say that I have checked several questions about this here and no solution has worked. I am giving alter table in the working table to add two Foreign Keys...one of them…
-
0
votes1
answer52
viewsHow To Use Where IN in Query
How can I perform a query below with mysql in the: SELECT gps.positions.id, gps.positions.protocol, gps.positions.deviceid, gps.positions.servertime, gps.positions.devicetime, gps.positions.fixtime,…
-
0
votes1
answer41
viewsDoubt about Mysql Query
What code is required to display all a user’s posts? I did something like this in PHP: "SELECT * FROM postagens WHERE id='$p_id' AND u_id='$u_id';"; But always returns 0 lines :( CREATE DATABASE IF…
-
0
votes0
answers42
viewsList phones on the same line
i have a database that has the following tables: contact, phone and contact table_phone since the cardinality in my application has to be N:N. When I make a Join Inner, the return brings me, for…
-
0
votes1
answer3324
viewsCompare records between two tables in MYSQL
I need a solution to compare any changes in the table products_csv in relation to table products even if it is only the exchange of a (letter or number) in some field. I am using the code below but…
-
0
votes1
answer40
viewsDoubt about mysql query
I performed a Query in the Mysql database, but I realized that I brought duplicate values. I didn’t understand where the problem might be in Query, follow the query. select usuarios.nome as…
mysqlasked 6 years, 8 months ago Mauricio3012 31 -
0
votes1
answer70
viewsMy form does not send to the bank
I created a form to save data in the database Mysql, but it’s not working as expected. I’m having trouble identifying the problem because no error appears, the page just a refresh. Table in the…
-
0
votes1
answer225
viewsHow to validate higher value received in mysql?
I have a query that returns the last accesses of the users in the system. I would like to know how I could treat to return only those dates that are longer than 15 days. This is the consultation:…
-
0
votes0
answers60
viewsHow to calculate the next available house?
I’m doing a project right now and I’m having a problem with an algorithm. Taking into account the 4 directions ( North,East,South,West), if the user chooses one of the 4, should be allocated the…
-
0
votes1
answer107
viewsDrag a div and on drop, save your location in the database
Hello, I have the following code: <div style="width:200px;height:200px;background-color:red"> <div style="width:20px;line-height:20px;border-radius:100%;…
-
0
votes1
answer116
viewsChanging the Mysql version
I have this table in Mysql called logou: id | idconta | dia This query in Mysql always worked on my server: SELECT dia FROM logou GROUP BY YEAR(dia), MONTH(dia) ORDER BY dia DESC But now that the…
mysqlasked 6 years, 8 months ago caiocafardo 1,897 -
0
votes0
answers32
viewsHow do I apply this Login class to my Login form?
<?php if (!empty($_POST)) { // Recebendo dados do Formulário $usuario = $Modulo->NoSqlInject((isset($_POST['usuario'])) ? $_POST['usuario'] : NULL); $senha =…
-
0
votes0
answers69
viewsBring data without repeating id
I have a table with the name of Posts table, I have a table with the name of Users table, I have a table with the name of Relations table. Now what happens is that this Relations table works as…
-
0
votes1
answer2450
viewsINNER JOIN sql query with WHERE and GROUP BY
I have this query in my database only that I wanted to insert a sum in a.preco_produto and do to GROUP BY only if I put GROUP BY a.codigo_loja in this query of this error> #1064 - You have an…
-
0
votes0
answers70
viewsMysql to MYSQLI connection (class)
Would you like to make this connection on mysqli, could someone help me? I’m having some difficulties. <?php Class mysql { public $query; public $data; public $result; public $rows; protected…
-
0
votes2
answers58
viewsProblem sending something to database
So, I’m trying to create a page, really simple, to send some things to the database, (id,username,code_placa) but I’m not able to, when removing the lines that give error, the page opens, however,…
-
0
votes1
answer667
viewsPopular select from countries and states with php mysql ajax
I have 2 selects: #parents and #status. I want that when selecting the country, it populates the state only with the states of that country, which are written in a mysql table: tabela_paises id|pais…
-
0
votes1
answer164
viewsWrite data to 3 PDO related tables
I need to input data into 3 tables related using the PDO. The first table t_repo_proj (repositórios), and the second t_grnte_proj (gerentes). I need to know which manager is associated with which…
-
0
votes2
answers56
viewsCreate OR Update -> Mysql
There is something 'native' from MYSQL that does an Update OR Create? Something that is more performative than SELECT, validation and INSERT/UPDATE as is normally done. I do not refer to methods…
mysqlasked 6 years, 8 months ago David Dias 995 -
0
votes1
answer126
viewsRemote Connection to DBA MYSQL + PHP
Hello I’m trying to make a test connection to a server called * infinityfree I’m using php with PDO. Call for connection. <?php try { $connex = new…
-
0
votes1
answer307
viewsHow to find the last 5 images inserted in the seat and show in a carousel?
I want to take the last five images in the bank and show them on a carousel, with the respective title, and those marks that indicate the image being viewed. I’m working with Laravel 5.1 and mysql.…
-
0
votes1
answer110
views -
0
votes1
answer54
viewsFETCH_CLASS does not arrow parent class values
I am using FETCH_CLASS to map the classes, but when for example one class inherits another, FETCH_CLASS does not find the attributes of the parent class and ends up creating new attributes class…
-
0
votes2
answers143
viewsDouble query in 1 query
I have 2 tables one of users and another of subscribers, I have an Internet that sends to the table of subscribers the email of the user who registered and the name of the channel 1st users id |…