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
answer683
viewsBetter understanding max_user_connections count in Mysql
If on a page I have connection and query to more than one database will count as two connections And if it is the same database but has multiple queries (select) it will count as several active…
-
0
votes0
answers266
viewsPHP script to prevent two equal data from being entered (Mysql)
I am developing a system for my school’s library and would like to know how to make a script in PHP, with Mysql database, which, at the time of registration, check if there is a record with that…
-
0
votes1
answer401
viewsCreate Slug across MYSQL database
I have an older MYSQL database and in it I have a news table and I needed to create a "Slug" column to save Slug from the news. Therefore, I would like to create an automatic Slug for all records…
-
0
votes1
answer266
viewsQuery with Count returning empty
I have the following appointment: SELECT numero, sistema, status, date_first_queued FROM ocorrencias HAVING DATE(date_first_queued) between DATE_FORMAT(CURDATE() ,'%Y-%m-01') AND CURDATE() AND…
mysqlasked 7 years, 11 months ago Chefe Druida 1,086 -
0
votes2
answers133
viewsCatch last grouped Mysql record per year
I have the following table I need to return only the last record of the teaching stage ordered by academic year, using Laravel/Mysql Example: 2002 - 15 / 2004 - 16 I’m trying to: $carga_horaria =…
-
0
votes1
answer97
viewsHow to remove, insert, or change a single character in a field in Mysql?
I have the following table in Mysql: Id | comida | preco 1 | batata | 325 2 | carne | 3.10 3 | speculoos | 3.00 I wish I could change the points according to the needs below: If the food = potato,…
-
0
votes1
answer265
viewsDelete Mysql data
I have a table with a large amount of data (380 million). I need to erase the old data that is no longer useful in the system. I am generating backup for precaution. What’s the best way to erase?…
mysqlasked 6 years, 3 months ago Pedro Augusto 2,392 -
0
votes1
answer57
viewsUPDATE IN MYSQL
I have an encrypted field in the MYSQL database. I’m trying to update this way UPDATE USUARIOS SET SENHA = md5(1234) WHERE ID = 216; but give me this error message: Error Code: 1406. Data Too long…
mysqlasked 6 years, 3 months ago Leonardo Palmieri 71 -
0
votes0
answers97
viewsMysql accent problem, which grouping should I use?
I’m having problems with accentuating my data stored in mysql already put ut8_general_ci grouping, ut8_bin and it didn’t work. what should I do?
-
0
votes1
answer1232
viewsHow to break lines in the output of an Array?
Good afternoon, I have an array in PHP that shows the date that was made the last backup of each store, and the information is shown as follows: LOJA01 - Bkp 01 teve o ultimo backup em1: 02-01-2017.…
-
0
votes0
answers261
viewsMysql hangs when trying to query table with many records (PHP)
I am trying to make a filter where the query is done in a table where the id of the last record is in the number 468.466. In the filter, I need to make a comparison with a View, which has your id…
-
0
votes0
answers32
viewsHow to put the value of a field acquired with jquery in php?
I want to do a try check as parameter the date of a datepicker and the id of an item. <script> $('.menu-item').click(function() { var item = $(this).attr('value'); alert(item); });…
-
0
votes1
answer1623
viewsError using PDO: "Call to a Member Function query() on a non-object in ..."
I am trying to make a query in the bank, but I get the following error: Fatal error: Call to a Member Function query() on a non-object in C: wamp www site-noticias Class Publicacao.class.php on line…
-
0
votes3
answers928
viewsUpdate in a field that cannot be negative
I need to make a update in a given field, where it should reach at least up to "zero" cannot be negative. And when it reaches zero I need it to give the update of the remaining quantity in the next…
-
0
votes2
answers4705
viewsCreate profile page according to user
I want to make every user registered on my site have their own profile page, where all users can access it and see the information, such as name, email, date of birth, etc.. But I don’t know two…
-
0
votes1
answer855
viewsSearch field/data filter
Hello, I’m developing a field of data research. And this, is working very well so far; but I would like to add some query parameters to this field. As it is today (search possibilities): Data…
-
0
votes1
answer291
viewsHow to query MYSQL in 2 columns and sort 1st results of title column and then Description column
I’m setting up a job agency website and I have a search that searches the field title and description, what the person searched, as per the query below: SELECT * FROM vagas WHERE (titulo LIKE…
-
0
votes1
answer59
viewsIFNULL is not working
select IFNULL(valor_unit,0) from tb_itens where id = 3 In the scenario where the id = 3 does not exist in my table the SELECT does not return '0' just keeps returning NULL, I can’t find the problem.…
mysqlasked 6 years, 2 months ago Maurício Sanches 487 -
0
votes1
answer123
viewsLIKE with COUNT in PHP
I can’t understand what’s going wrong with the code: $query="SELECT aluno FROM bonesmirn2 WHERE data LIKE '%2018-09%' AS faltas GROUP BY aluno HAVING COUNT(aluno) > 0 ORDER BY COUNT(aluno) DESC";…
-
0
votes1
answer26
viewsUpdate MYSQL Table Data
I can’t accomplish UPDATE of the data from my table. $id = 7; $TrocaNome = "Ronaldo"; $TrocaEmail = "[email protected]"; $up = "UPDATE usuario SET nome='$TrocaNome', email='$TrocaEmail' WHERE…
-
0
votes2
answers497
viewsRecording data from a SESSION in the BD
I would like to add in the field registered the functionname logged in to database. <?php require_once("../../../session.php"); require_once("../../../class.user.php"); $auth_user = new USER();…
-
0
votes2
answers568
viewsQuery creation with Union ALL to join tables with indexing by table name
There’s a problem that they did in a database, which I need to solve temporarily, they created several tables with index in the table name, where the system creates a new table for each new user...…
-
0
votes1
answer461
viewsMYSQL is terminating alone when running a database
I have a problem with my mysql on localhost. I use xampp as a service and Heidisql to facilitate the programming process. Anyway, when running the file below the MYSQL service is terminating alone…
-
0
votes1
answer56
viewsPHP | MYSQL Error: Operand should contain 10 column(s)
I am trying to develop a Query where, need to be Consulted in 6 equal tables if there is any specific value. Here is my Query: SELECT ( CASE WHEN (SELECT * FROM sala1 WHERE aluno =…
-
0
votes0
answers113
viewsHow to search for similar words (spelling errors) in MYSQL
I am building a search system using Mysql and PHP, with a fomulário in the _GET method. I wanted to set up a system that if the person type wrong, the site can "correct" the word, or suggest the…
-
0
votes1
answer832
viewsError starting spring boot
Console displays the following error message: Exception in thread "main" java.lang.Noclassdeffounderror: org/springframework/boot/Springapplication at…
-
0
votes1
answer215
viewsError while creating mysql function
I’m trying to create the following function: DELIMITER // FUNCTION DISTANCIA ( lat1 DOUBLE, long1 DOUBLE, lat2 DOUBLE, long2 DOUBLE ) RETURNS DOUBLE DETERMINISTIC BEGIN DECLARE d2r DOUBLE; DECLARE…
-
0
votes1
answer30
views -
0
votes1
answer267
viewsquery mysql autocomplete problem
I am developing an app and, in one of the steps, I am using a mysql database to store code and product information. When the user enters the product code in an input field, he is searching…
-
0
votes0
answers19
viewsSelection does not display data on screen (php and mysql)
<?php class categoria { public function selecao($pesquisa){ require_once 'conexao.php'; $con = new conexao(); $conn = $con->conectar(); $sql = "select *…
-
0
votes2
answers400
viewsAdd to MYSQL query in varchar field by deleting Strings
How to add directly to the query MYSQL when the field is sweep and need to delete some strings. Example: +------------+ |valor_total | +------------+ |R$ 2.277,90 | |R$ 3.217,30 | |R$ 9.857,40 |…
-
0
votes1
answer45
viewsRemove Group_concat and list each one separately
I want to remove group_concat to list each one separately, some hint? SELECT U.login, (SELECT Group_concat(AC.curso ORDER BY id ASC) FROM alunos_cursos AC LEFT JOIN cursos C ON AC.curso = C.id WHERE…
-
0
votes0
answers133
viewsConvert Varchar column to Date without losing the data
Before the database was saving the date in a varchar field and in the Brazilian standard (dd/mm/YYYY), then I modified the values using the code below: UPDATE tabela SET coluna=…
-
0
votes0
answers28
viewsSelect problem using php and mysql
I’m new with the development in php and was seeing some examples of select in a table in mysql on the net, but no successful execution. The code is as follows:: $conexao = mysql_connect(DB_HOST,…
-
0
votes2
answers128
viewsPassing parameter in Mysql LIMIT
I am creating a paging system and in mysql I am using this way I take from record 1 and walk up to the 20 SELECT * FROM sistema LIMIT 1 , 20 I pick up from record 2 and walk up to 21 SELECT * FROM…
-
0
votes0
answers138
viewsHow to pass data from one table to another when one has a relationship?
I created a table by Migration that has relationships and have a table with the same fields (except the incremental id) that has the data. I need to pass the data from the table that has the data to…
-
0
votes2
answers1197
viewshow to insert data into two tables at the same time
I wonder how I can do to insert data into two tables at the same time , well I do not know if it is right the way I am doing it is not giving any error but also did not insert anything . The code…
-
0
votes1
answer135
viewsSQL - Import data from a file
Hello, friends as they are? Good I am facing a problem to import a previously created table: The following return message when I try to import into Mysql: Static analysis: 3 errors Were found During…
-
0
votes1
answer23
viewsBecause the form only worked once
Hello I made a small form and it only worked once , I didn’t change the code after that and it doesn’t work anymore what it could be ? <?php error_reporting(-1); ini_set('display_errors', 'On');…
-
0
votes0
answers45
viewsMysql - Server change caused it to display dot instead of comma
I have an app C# .net using Mysql as db, and was staying at Locaweb. I posted the files on the server SmarterAsp and restored the database there as well. Now in the application, the fields 'double'…
mysqlasked 6 years, 2 months ago RafaelMoura 352 -
0
votes1
answer17
viewsResult Grouped by Field and Listing N Records
I have a table called area with the structure: Id, Nome, Status I have another table called news with the structure: Id,Título,Descricao,Data,IdArea,Status I would like to return all news records…
-
0
votes2
answers168
viewsData is not being written to the BD by PHP
I’m studying PHP object oriented and, from some tutorials taken from the net (Pdo, pojo, Dao...), I made a very simple system in which I get the value inserted in <input type="text"> and write…
-
0
votes1
answer21
viewsScript does not save full word if it has accent
I have a script that works very well on my Dashboard, but I put it on another page and is not working. When a word has accent, eg: "Natalia" the system is saving in bd only "Nat" excluding the rest…
-
0
votes0
answers33
viewsLinking a question with a database answer
I’m trying to create a question and answer system in PHP and Mysql. I already have the bank created, I would like to know how to make the question is linked to the answer that the student made. And…
-
0
votes0
answers32
viewsForm - Take data with PHP
I’m a beginner in this part of creating websites, I’m making a site where will have a registration form, and I want this registration to go to a database, or a page that can access all the records…
-
0
votes1
answer111
viewsWhat is the best Mysql type to store numeric values
I have a table where you store the number of places in numerical values. I would like to know the best type mysql to store these values, taking into account that it can be calculated with another…
mysqlasked 6 years, 1 month ago user24136 -
0
votes1
answer568
viewsConvert entire mysql database to lowercase
It is possible convert all columns of tables in a database mysql for lower-case letters? I have several records and several tables, all are a patchwork of upper and lower case (and some with…
-
0
votes1
answer91
viewsUnable to load requested file: products / list_table.php
I’m trying to show off in a view data coming from the database, when I tried to run appeared the following message: Um erro encontrado Não foi possível carregar o arquivo solicitado: produtos /…
-
0
votes0
answers168
viewsHow to add several checkboxes to a php table?
I’ve seen a lot of questions answered that look like mine but so far nothing like it! Here’s the thing: I have the codes below and I don’t know how to insert the checkbox on the table. Form code…
-
0
votes1
answer153
views