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
answer65
viewsMethod Search database records on the same PHP form page
Good morning guys, I am working on a personal project and I plan to make a page to search for customers informing their name and CPF for now the code is like this, but it is not working someone…
-
-1
votes2
answers53
viewsDoubt SELECT Mysql
In a certain select I can reference two tables by foreign keys. Ex:Ida/ Idb Ida = Idb Table A has a column called C Table B has three columns called D, E, F Both tables have similar contents to…
-
-1
votes1
answer519
viewsWhat is the correct way to install LAMPP?
I started using Linux (Ubuntu 18.04) recently and have come across many difficulties. So, I tried a few times to install the lampp stack on Ubuntu and I was unable to succeed. There was always some…
-
-1
votes4
answers126
viewsCan I put a WHERE for each column?
I’m willing to put a condition for each column in my SELECT, this is possible? SELECT count(id_casa) as casaAzul, count(id_casa) as casaAmarela FROM tb_casa Where: Where column 1: Where cor_casa =…
-
-1
votes1
answer309
viewsQuery with two sorts in descending order
There is the possibility of executing a query searching by contract number, ordering by descending date and their respective service orders? If so, can you give me an example for knowledge?? Query…
-
-1
votes1
answer52
viewsI cannot register a record in the database
<?php session_start(); if(!(isset($_SESSION['usuario']))){ header("location: index.php"); } include './classes/Conexao.class.php'; include…
-
-1
votes1
answer74
viewsChecking if there is a result in the query
Hello, I need to check if there is an answer to my query. If there is, you should display an HTML code displaying the database data. Otherwise you should notify that there is no result. How do I…
-
-1
votes3
answers1495
viewsHow to form in stages?
I’m creating a system and wanted to know how to make a form per step , it works by checkbox and input and type just wanted to know how to pass the data from the first form to the two to be inserted…
-
-1
votes1
answer412
viewsJoin 2 SQL with different results
They work perfectly, but now I need to join them, but the results will be different or I can not join the result, but rather join the SQL and get the result of the two below, but I do not know how…
-
-1
votes1
answer39
viewsProcedures Mysql
Hi, I’m new to procedures and I have a question I couldn’t find on the internet. I need to create a procedure to include 2 tables: "User", "Supplier". The provider has a user FK, that is, in this…
-
-1
votes1
answer1839
viewsSQL To Count If Greater Than 1
My problem is this: I have to make a condition if the SEQ_VENDA has more than 001 NUMERO, it bring the SELECT data. And if you only have 1 NUMBER for SEQ_VENDA do not bring in SQL…
-
-1
votes2
answers128
viewsDate balance in mysql
I have a table requests and would like to return to the following situation. select all orders of a current month idClient by summing the values of the same. type select * from pedidos where…
-
-1
votes1
answer126
viewsMysql - update via db with "set price = price - 5%"
How do I update where it will decrease the price of the product by percentage? Example: Table: id | products 10 | 1.40 How do I update to 1.40 - 5%?…
-
-1
votes1
answer154
viewsI can use two Insert into in the same command
i have the following line of code and wanted to know if it is possible to make two select within a single sql command cmd = new MySqlCommand("insert into FUNCIONARIO(`CPF_FUNCIONARIO`,…
-
-1
votes1
answer20
viewsEloquent returning field and value
My select is returning the field and value of the id that is in the table and need to return only the value,? $id = DB::table('participantes') ->select('id') ->orderBy('id','DESC')…
-
-1
votes1
answer43
viewsRemove space from a column in Opencart
I made a select in the table oc_product SELECT * FROM oc_product in the column sku needed to remove all spaces of these items are over 2000 lines with this problem is possible to remove it…
-
-1
votes3
answers107
viewsWrong encoding in Mysql when I enter via AJAX
I’m having trouble finding a solution to my problem. Briefly: I send data to a table, using a php file that does querry, and an ajax call that sends all the values I need to the php file. When it is…
-
-1
votes2
answers56
viewsError while fetching Mysql data with PHP
I can’t get information from the database using php. See the code I implemented to get this information: // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check…
-
-1
votes1
answer28
viewsConfigure database creation in another folder
You can change the mysql database source folder? I wanted to change his source folder
mysqlasked 6 years, 5 months ago gabrielfalieri 1,231 -
-1
votes1
answer54
viewsTake data from a page and go to the database
I want to do sweepstakes via Whatsapp. To participate, the person would send a message with the name to the number I will announce and she receives the confirmation reply and the token number. I…
-
-1
votes2
answers272
viewsSql auction script
I need to make an application for an auction company of used things, then I will need to create an interface where n customers can give a minimum bid and a maximum bid for a product X and the system…
-
-1
votes1
answer490
viewsHow to recover a database in Mysql
I had a problem with a client whose operating system stopped working. I was able to access the disk and there is a Mysql database inside the folder C:\ProgramData\MySQL\MySQL Server 5.7\Data\BDados…
mysqlasked 6 years, 5 months ago Alberto Ferraz 1 -
-1
votes1
answer70
viewshow to do an input Insert by adding the value to the database column? Mysql + php
I’m a beginner in php and am doing a tcc project of my technical course where, I have to register hours of an employee. how do I do so, by making the value add to what is already registered in the…
-
-1
votes1
answer274
viewsHow to make Select from all table ids except the first 2?
I need to make a select in mysql of all users of a table, but I cannot receive the first two users of the table and I need to do this without specifying id, since when more users are registered I…
-
-1
votes1
answer1596
viewsMYSQL - Error Code: 1451. Cannot delete or update a Parent Row: a Foreign key Constraint fails
I have to make a Rigger, where when being excluded an employee will also be excluded his dependent. But I can not delete. the code was like this: delimiter $ create trigger TRG_excluiDependente_AD…
-
-1
votes1
answer36
viewsMysql_error when resetting root password of MySQL_"Error when establishing a connection to the database"
I am beginner and do not know how to fix this issue of Wordpress connection to Mysql database. The error occurs after I reset the root mysql password, the Site crashed and prints the message: "Error…
-
-1
votes1
answer294
viewsExports database query to txt with php
//Arquivo txt $arquivo = "email.txt"; //abrir arquivo txt $arq = fopen($arquivo,"w"); //faz consulta no banco de dados $result = mysql_query("SELECT * FROM usuarios"); $cabecalho = "Emails…
-
-1
votes1
answer511
viewsArray[] in database, how to create and manipulate?
I own a array of integers, a int[]. Is it possible to save it directly to the database without having to Serialize? For example: CREATE TABLE teste( numeros integer[] ); And then use SELECT numeros…
-
-1
votes1
answer346
viewsHow to check repeated email in the database?
When I put an email, even if it is repeated or not, returns me this error here: Warning: mysql_num_rows() expects Parameter 1 to be Resource, Boolean Given in C: xampp htdocs sistemaslogin classes…
-
-1
votes1
answer370
viewsCalculate duration in php
Hi, I have another little problem and I need someone’s help. The system I’m doing is for a school and I need my system to calculate the duration that each student had within the classes, for that, I…
-
-1
votes1
answer275
viewsDelete record in multiple tables in Mysql
I have several tables with the same field versao. I would like to delete simultaneously in all tables all records containing the field versao with the same 'XYZ' value'. I tried to DELETE FROM `t1`,…
mysqlasked 6 years, 1 month ago Walter Robynson 31 -
-1
votes1
answer169
viewsHow to insert data and a table with Foreign Key in PHP/MYSQL
i have 2 tables Client and Address with relationship 1.1 In the address table has the FK. What would be the right way to do the Insert in these tables, relating client to address? I imagine…
-
-1
votes2
answers523
viewsA phone chart for each customer or just one for all customers?
Currently in college we learn like this: It has a client entity, this client has its attributes and one of them is the phone, I want it to be possible to register several phones, we create a single…
-
-1
votes1
answer30
viewsBring in select html the record that was saved in the database
Good morning Can anyone tell me how to bring into a Select component of html the records that are in PHP ? In fact, I know how to bring, but how can I bring only what was saved in the bank and even…
-
-1
votes1
answer26
viewsmysql Trigger to replicate the ID value in another column
I’ve been around this but the value is "NULL" create trigger tr_ReplID before insert on DuploId FOR EACH ROW set new.ID=new.Replica_ID; What do I mean... When entering data in the Processes table ID…
-
-1
votes1
answer25
views -
-1
votes1
answer155
viewsSpring boot with Docker and Mysql without Docker
I have a java application with spring boot and mysql, I put my application running in Docker container but I don’t want mysql to be in Docker. The problem is that I am not getting my application to…
-
-1
votes1
answer1140
viewsPHP connection using phpMyAdmin
Good evening, I’m doing a college job of creating an e-commerce site, but I’m not able to connect with my comic book, can anyone help me ? When I turn I keep saying you’re wrong on line 17, but I…
-
-1
votes1
answer236
viewsCOM serial port
I’m trying to execute a code every time, where it takes the value sent by the COM port of the Arduino, prints in a textbox and soon after generates an Insert in the mysql database. Only that he read…
-
-1
votes1
answer27
viewsHelp to insert data into the table
I have a table on Mysql with the name usuários with the following items: convite,quantidade_de_convites. I want when adding an invitation, update the amount how I do it?.…
-
-1
votes1
answer43
viewsProblems in a query in mysql - accentuation
Good morning, if I search "Memory" in an input, I made a code to take the accent and is going to query like this: "Memoria" Soon returns to me those who are "Memory" The problem is that my database…
-
-1
votes1
answer96
viewsWhich component should I use?
I am creating a system, and there is one similar to mine, in the table of the image, I will create a list, where will have a check, a label, 2 textedit and an image to indicate q the check this…
-
-1
votes1
answer32
viewsHow to create a function to add in php and save in mysql?
Good afternoon. First, I want to create a function in PHP that every time you run add +1 in Mysql. In my Mysql you will have a column called numbers, whenever the function is executed, it will…
-
-1
votes1
answer46
viewsFOREIGN KEY Mysql PHP
I’m a beginner in this world and I have a question. How do I access only a single row of an SQL table by ID? I have a "company" table that has a foreign key with the id of another table: table…
-
-1
votes1
answer845
viewsSave form in txt file
It is possible to save a form in TXT file? I will explain... I have a site for data protection like NAME and EMAIL, only. I would like to save in TXT every new insertion. So: 1| Fulano -…
-
-1
votes2
answers26
viewsGROUP BY grouping data from another column into another column
all right? I need a help, I will explain below what I am doing and what I need: I am developing for a digital advertising agency an automatic e-mail system that contains all the campaigns and…
-
-1
votes1
answer112
viewsSearch by date does not work
I am trying to do a search in the mysql database doing a filter by date and is not bringing any results. On the screen below I was able to search for the other criteria This is the code that’s doing…
-
-1
votes1
answer76
viewsImporting backup from Postgresql to Mysql Workbench
I backed up a database in Postgresql and now want to import it into Mysql Workbench on linux, as I do this (transfer . backup to . sql)?
mysqlasked 5 years, 11 months ago user141036 -
-1
votes1
answer48
viewsHow to bring a bank query according to a select, for an input
I want to put a value of the bank when selecting the vehicle, until I was able to put any value, but I can not search the bank via AJAX or JSON…
-
-1
votes2
answers34
viewsRecord duplicity between two tables
I have two tables that have phone field. I needed to make a query where I searched all the phones equal between these two tables. It is possible?
mysqlasked 5 years, 11 months ago Gustavo Ribeiro 13