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
votes2
answers199
viewsLoad objects from other classes
I have a selectOneMenu which will be used to list all Generations (data in the database). These data should be listed when registering a Nature object. My selectOneMenu is like this :…
-
0
votes0
answers30
viewsCreate GRANT on condition
I have a DRIVER table (columns: name, cnh, address, dots_wallet) and a GRANT analyst. The analyst can only access data from drivers who have more than 0 points in the wallet. Grant select on…
-
0
votes2
answers104
viewsProblems Making Simple Insert in Bank - Unexpected Token
I’m having problems making entries in the database, someone could tell me what the possible problems? SQL 1: INSERT INTO data_inicio (data_sys, descricao) VALUES (NOW(),'Data de inicio'); Error in…
-
0
votes1
answer2571
viewsReset AUTO INCREMENT and organize item ID
What command can I use to rearrange the ID of all items in a table? The table name is produtos and the column is id. Currently they are this way: id: 1 - 3 - 7 - 8 - 9 - 11... That is, they are not…
-
0
votes0
answers138
viewsSearch Mysql record without using ? id=id in URL
Guys, I’m trying not to use $_GET[] on the link, but I can’t find any way to make it happen. I mean, instead of "site.com/? post=name news" stay "site.com/name-news". I’ve already reviewed forums…
-
0
votes2
answers893
viewsDisable ONLY_FULL_GROUP_BY at once
How do I disable ONLY_FULL_GROUP_BY it remains disabled for good? I wonder why I already did the steps below: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); and also…
-
0
votes0
answers41
viewsSpecify table name using namespace in createQuery in Doctrine
I need to create a database query in a table whose name is order and that cannot be changed. I made the following query: $query = $entityManager->createQuery("SELECT sum(o.orderPrice) FROM…
-
0
votes1
answer723
viewshow to update the database using checkbox
would like to know how I can do an update with checkbox, with the system I developed I can get normal all checkbox that will be changed but I can’t catch the id of the respective how can I do this?…
-
0
votes1
answer38
viewsFilter data in sql
I have a table clientes with the columns: nome cidade email1 email2 Not all customers have registered email. How do I set up an instruction sql where only returns customers that contain email1 or…
-
0
votes1
answer49
viewsInsert into SQL if record does not exist
I have the following PHP function that adds a row to the table: $idmusica = $_GET['idmusica']; $queryvota=(" INSERT INTO euk_sugestoes_votos (idusuario, idmusica) VALUES ($userid, $idmusica) "); The…
-
0
votes0
answers51
viewsSend value of an element that has a date-name
I have a form that has a <span> that works as a slider that you select a value and with it is carried out the sending of an email. But I also need it sent to the database, and I can’t make…
-
0
votes0
answers1111
viewsmysql error: ERROR 1045 (28000): Access denied for user 'Weslei'@'localhost' (using password: NO)
Guys, first of all I’ve reviewed all the topics about it here and the error in question remains. I have tested several solutions presented here and indexed in google but will not, because everything…
-
0
votes1
answer96
viewshow to do a query by ordering an ascending and a descending column
need to do a query that searches for a column increasing and in the same query another column descending for example in the result below: item | quantidade carro | 400 carro | 340 dado | 240 disco |…
-
0
votes1
answer43
viewsMultiple Insert to php database
Hello I am creating a link shortener and I wanted to put a multiple link insert type a person puts several links in an input separating each link with % or other character and each made php read the…
-
0
votes0
answers38
viewsFatal error generated in PHP code msql. How to update the code to mysqli and PHP 7 and fix the error?
I’m a beginner in PHP, I’m doing a real estate project in PHP of a course I bought, and a problem appeared in the configuration part of the project’s login panel. The problem is that when I…
-
0
votes0
answers55
viewsHow to create triggers in BD using XAMPP?
A group has N events and each event has M spending. 1) The following Trigger should update the last modification made in the group when an INSERT is made in the event table. Why it does not work?…
-
0
votes2
answers533
viewsSet the first letter of the $variable in uppercase
I am using MYSQL to show some data on my website... But some data is in lower case, and I need the first letter to be uppercase. However I do not know how to do this using variable... I need the…
-
0
votes0
answers35
viewsHow to Get Results Close to a Specific
I’m trying to get results close to a specific record. I tried to use the ABS, but I couldn’t do it using it. The result limit is 5. Dice MARCA NOME_MARCA MEDIA 8 TOYOTA 100 11 HONDA 100 5 FORD 100…
mysqlasked 8 years, 6 months ago Diego Souza 16,524 -
0
votes0
answers45
viewsCAST in multiple columns to average
I have several columns in a csv table, I imported the table into mysql, but when I import into mysql I have to do this import as varchar for all data. If I do a CAST in these columns and then take…
-
0
votes2
answers56
viewsHow to select in a table as if it were two records
On the table person has the following information ID | NOME | É_ALUNO | É_RESPONSAVEL 1 | ALUNO | TRUE | FALSE 2 | RESPON| FALSE | TRUE There is another table with the name student, in this table…
-
0
votes0
answers262
viewsMysql with Entity Framework Code First
I have a project where I need to use Mysql as a database and EF6 with the CODE FIRST approach. I installed Mysql.Data.Entity 6.9.9 and Entityframework 6.1.3 My app.config looks like this:…
-
0
votes1
answer1197
viewsSELECT to filter null value?
I’m trying to make a SELECT in a table conta, in this table I have a foreign key to the table venda, in certain cases this foreign key is null and I want to return the information of the sale when…
-
0
votes1
answer122
viewsHow to take data through the GET method?
I am setting up a panel for financial control of a MEI company (This is my company). I am developing the order part, follow doubt: The point is, I already use this GET to search the pages, how could…
-
0
votes1
answer67
viewsWhere am I going wrong on this select?
I made the Select below only that it is not adding by the correct column, where I am missing? In my structure I have the field dtConcat and the field dtConcat2 (these dates are different one is for…
-
0
votes1
answer236
viewsCreate and store MD5 hash of existing value after INSERT
I have an X table, with a field called email and another email_hash, I would like that every time a new record was inserted with email, Mysql would use the value of the inserted email and create an…
-
0
votes1
answer125
viewsCombobox brings only one Mysql table result (Nodejs + Javascript)
I am able to bring in the combobox only one value that is in the mysql table, I need to list the two items in the same combobox. It is appearing one in a combobox and the other just below. <div…
-
0
votes1
answer207
viewsGenerate Table with PHP Group Index
How can I make a Table that shows me a Line at the beginning of each Group in a table To understand me better I’m putting down an image of how I need Current Table Table With Index <table…
-
0
votes1
answer43
viewsError accessing RDS database with Heidsql
I get an error message when entering the Amazon RDS database: The access data is correct and the seat is spinning. Is there any procedure to be done to access the RSD database in Heidsql ??…
-
0
votes0
answers60
viewsAfter loading reply in div without refresh, update div containing PHP/MYSQL search
The page already loads the content in a div without refresh, the problem is the following: It carries the answer inside a div rem refresh, giving the answer, I need that if the product is added,…
-
0
votes1
answer315
viewsHow do I sort a date field in mysql?
How do I order decreasingly (select * from tabela order by date desc) a date field inserted by the datepicker script in the format dd-mm-yyyy in Mysql? Note: The dates are being ordered only by day,…
-
0
votes1
answer65
viewsAuthentication problem in PHP, returns PDO::errorcode(): 00000
I have a problem to authenticate a site with php, when I put the data in the form it returns the error message I enter if it failed and another error message 0000 in the login method. Apparently I…
-
0
votes2
answers59
viewsHow not to return an "X" value in the BD?
How do I not return an "X" value in the database? For example, I have a site style Firefly, and the same has the page of each artist where is the tab "Related Artists" which is based on the TAGS…
-
0
votes1
answer46
viewsOrganize mysql select by month groups
I’m trying to organize a return from my mysql bank in months , ie , so I have groups of months of donations that the site that work receives , I tried so: SELECT * , MONTH( `DataConfirmacao` ) FROM…
-
0
votes1
answer2600
viewsDelete button with modal mysql/php
I am a beginner and I have a problem with a button (delete with modal). When clicking the button, the system should display the modal and if I click "yes", should delete the record. I’m keeping my…
-
0
votes1
answer475
viewsHow to insert data into another table from the foreign key?
I have a table in my database called imoveis where I have some columns, standing out localizacao_fk and correspondencia_fk, both foreign keys that reference the table enderecos. What I want to know…
-
0
votes1
answer1507
viewsUndefined object reference for an instance of a Visual Studio object
I have a problem with the id variable of my dataGridView, it is giving the following error: "Object reference not defined for an instance of a Visual Studio object". I am using Windows Form, Mysql…
-
0
votes1
answer623
viewsUPDATE in another table when updating a record does not work - CODEIGNITER - MYSQL
Hello, the code to update a record to another table does not work. I need to update the table vendas when saving a record from the table lancamentos. on the table lancamentos there is the column…
-
0
votes1
answer2683
viewsDate Shorter and Longer than X days Mysql
I have a field on the table called registro_data_instalacao of the kind date, I need to display the logs with the registro_data_instalacao where the date is greater than 3 days and less than 30…
-
0
votes1
answer865
viewsMy code for this error Fatal error: Call to a Member Function fetch_assoc() on Boolean
Does anyone know why this mistake in php when viewing a table on mysql "Fatal error: Call to a Member Function fetch_assoc() on Boolean in /Storage/Emulated/0/site/store/Adm/editar_produto.php on…
-
0
votes2
answers1397
viewsInsert in the value of an input type="date" the date returned from the Select of the database
I’m taking a date from the database and displaying it in a field input in HTML. Only, for the client to be able to edit as a date, I need it to be in an input type="date". However, there seems to be…
-
0
votes1
answer90
viewsgroup records with the same value as a column
I have a table called shops, this table has: ..., store name and loja_category, example: nome_loja | loja_categoria -------------------------- loja1 | roupas loja2 | brinquedos loja3 | roupas what I…
-
0
votes1
answer94
viewsTable with select and Submit
Hello friends I’m trying to make a table, being for each table item appears a <select> and a submit that will send data via POST, as it is relative how many units will appear it is not…
-
0
votes1
answer150
viewsMysqli error - not registering in database
I am migrating from Mysql to Mysqli and have some errors in this my script that are not inserting into SQL <?php $host = 'localhost'; $user = 'root'; $pass = ''; $db = 'controleestoque'; //…
-
0
votes2
answers1587
viewsSQL Syntax Error in FK Creation
I’m looking to add a foreign key on the table CONSULTATION Only Mysql reports the following error: 1064 - You have an error in your SQL syntax; check the manual that Corresponds to your Mariadb…
-
0
votes0
answers111
viewsConfigure Mysql to accept reset TIMESTAMP
I’m migrating a database from SQL Server to the Mysql. On migration it gives error when it will popular tables on MYSQL TIMESTAMP. Incorrect datetime value ( 2007-10-21 00:00:00.000000 ) When du um…
-
0
votes1
answer43
viewsPostgresql: Catch amount of errors and hits
I need a query to get amount of errors and hits from this table.…
-
0
votes1
answer111
viewsMysql Connector sending null value
I have the following code: MySqlConnection mysql = new MySqlConnection(CONEXAO); mysql.Open(); try { MySqlCommand dbcmd = mysql.CreateCommand(); dbcmd.CommandText = "INSERT INTO robos…
-
0
votes2
answers124
viewsChartjs + mysql + php (month entries)
Guys, I have a user registration table. I am creating a chartjs to show on a bar chart the number of registered users per month. The mysql query would only have to return me 2 columns (MONTH AND…
-
0
votes3
answers215
viewsRelationship between two tables
Hello, I would like to know how to create a relationship between two tables, Time and Match, and in the match I should put the columns: time1, scoreboard 1, time2, scoreboard 2, and a date. But my…
-
0
votes0
answers66
viewsHelp to mount select on the seat
Hello, I need to assemble a query in the database that returns a set of records but as I do not have as much experience in database I would like you to give me a help. I got the tables…