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
answer46
viewsFilters with PHP priority
Hello, On many web platforms, I see that there are forms, search systems, etc., where the user needs to, mark some elements, be they dropdowns, checkboxes, radios Buttons, but in some of them,…
-
0
votes0
answers20
viewsSave clone Div arrays to an Insert
There are arrays that come from a div "clone" of jquery that can be duplicated or even more lines, like this: product[] value[] Qtd[] total[] product[] value[] Qtd[] total[] I need to save these…
-
0
votes1
answer76
viewsDifficulty writing 3 different input names with foreach
Hello, I am creating a shopping cart and need to record via form the products selected by the customer. Almost everything is working, missing only record the products in the table itemvenda. I made…
-
0
votes1
answer264
viewsInsert same data into two Mysql columns
Hello! I have a table with the name tabx and two columns y and z, when I insert the values in the column y I need a Trigger to copy this value to the column z. I have tried some solutions but…
-
0
votes1
answer948
viewsSave data from a query to an array and display via Jquery
I am making a game of questions and answers, I need to make a query on the bench and I will pick 4 columns (id, question, answer and challenge) and it will return me 10, 15 or 20 lines, depending on…
-
0
votes2
answers59
viewsProblem saving Arabic text in mysql
I have a site where there are several languages, but when trying to save a text field in the Arabic language, the same saved with characters like "اÙøµùø-Ø Ø§ÙØ ÙسÙØ ", already try to change mysql…
-
0
votes1
answer917
viewsList all data with the same id
I have the following problem: I have a table called pedido. In this table I get data from two other tables: I would like to make a list only of products that have the same id_venda. In my code only…
-
0
votes1
answer1026
viewsSelect with max(date), penultimate(date)
I have a chart with product code and date of sale. I would like to make a select by taking the product code, the date of the last sale and the date of the penultimate sale with group by code. It is…
-
0
votes0
answers24
viewsHow to sum the records of a given column
Well, it’s as follows I have the table invoices, with a certain column designated by "earnings". Each record, corresponds to a day, what I intend to do is a php script, which adds me all the "gains"…
-
0
votes1
answer81
viewsAdvanced SQL query with dates
I have been in trouble for days. I have my chart and need to count how many grades are late, so that’s okay. I just don’t know how to make that appointment. I need to check if they are late, to be…
-
0
votes2
answers207
viewsSearch multiple tables at once
Colleagues. I need to search several tables ( a total of 28 ) where each table corresponds to a state of Brazil. This search would be the zip code, which is one of the fields of these tables. Inner…
-
0
votes1
answer600
viewsInsert various data into a mysql column
Good afternoon Guys, I’m cracking my head open about how I make this insert in the bank, it’s kind of like this... I have a product, which needs to be priced more than one supplier, to compare…
-
0
votes0
answers27
viewsLoad pins selectively via Mysql - Maps API
I have a question about loading pins from a Mysql database. Let’s say I have a database that stores multiple latitudes and longitudes and needs to load some pins from them, via the Gmaps API.…
-
0
votes1
answer456
viewsList only data from the same id
Good guys after a long time hitting the head with a certain problem I can solve it in a certain way (gambiarra) but now I need to know how to list data from my database that is of the same id , i…
-
0
votes2
answers125
viewsAdd product value to purchase
Good guys I’m with the following difficulty, I have a very simple panel for sale : as you can see I have a combobox with some products in it , my problem and the following I would need as soon as I…
-
0
votes0
answers1275
viewsHow to use Inner Join in php?
Can someone help me? I have the following problem: I have 2 tables and in these 2 tables I have the names, and in the course table I have nome and in the category table I also have the field nome.…
-
0
votes1
answer455
viewsHow to run SQL with Entity Framework?
I tried to execute a command SQL for Entity Framework, tried in the following ways: string cmd = "UPDATE t0071_compra SET t0071_status = 'Enviado' WHERE t0071_id_compra = 4 AND t0020_id_empresa =…
-
0
votes1
answer726
viewsJoin with the same table more than once
I’m having a problem performing a query. The original table calls tbl_operacao, and contains the fields: id, tipo_operacao, idimovel, idproprietario, idlocatario, idseguro, idvalores. When I call…
-
0
votes2
answers410
viewsHow to use sprintf to mount an SQL query?
What is the correct way to use sprintf in mysqli and make the return IF? $rs = $mysqli->query(sprintf("INSERT INTO perguntas (chave, nome, email, idade, estado_civil, profissao, religiao,…
-
0
votes3
answers4197
viewsSelect from two tables without repeating data
I have two tables, one for users and one for photos where each line contains the user id of the respective photo. I want to select the user data and grab the photos by the user id of the photos…
-
0
votes1
answer151
viewsInsert mysql with Ajax inside While
I’m trying to make a dynamical Insert using ajax. as shown in the image below. I want to be able to click send from any line and do the post referring to it How can I do that <script…
-
0
votes1
answer47
viewsDoubt in consultation with Entityframework
how do I consult with EntityFramework? with lambda or linq SELECT t0051_id_medicamento, t0100_lote, SUM(t0100_qtde) FROM t0100_historico GROUP BY t0051_id_medicamento, t0100_lote;…
-
0
votes1
answer39
viewsSelect deleted a record and searching for others with the same code
The product code I pass to sql via php. For example $cd_product = 2; I would like to list everything but the product record (cd_product != 2). So far so good. However I would also like only the…
-
0
votes1
answer491
viewsMysql in Java Desktop applications for multiple establishments
Hello, if I make a Java Desktop application with a Mysql database, which will be delivered to several establishments to use, what about the database? Do you have any suggestions? The application, I…
-
0
votes2
answers1867
viewsHow to create installer for offline web system PHP + Mysql
I am developing a service order system in PHP and Mysql to be run offline. Only I wanted to distribute this system, but I don’t know how to package it. How do I create, like an installer of this…
-
0
votes1
answer103
viewsDoubt with php and mysql
Could someone help me out here? I’m starting in php now, I created a database in mysql(phpmyadimin) and related the primary key of one table as a foreign key in another. When I run the php script…
-
0
votes2
answers185
viewsHow to send form data via _SESSION?
How can I send data from the first form to the second and then send to mysql ? I tried everything, and when I send it to the database, only the data from the second comes in. I will put down my…
-
0
votes0
answers259
viewsHow to print in html in the form of a tax coupon?
How could the following table imprint on the html screen in the form of a fiscal coupon ? Type of the next image. on the side of the meal the amount.…
-
0
votes2
answers1096
viewsUTF8 on Mysql PHP connection
I have a PHP PDO connection with two databases, however, I’m having problems with the special characters of both. How to solve? $host = "localhost"; $user = "user"; $password = ""; $database1 =…
-
0
votes1
answer4133
viewsProblem starting mysql in xampp
i tried using xampp but every time I try to start mysql it accuses the following error: Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe"…
-
0
votes1
answer130
viewsInsert time period into database
I was thinking here... Is there any method to enter in the database several dates at the same time? For example an event that starts on 03/02 and goes until 07/02. How to insert this interval in…
-
0
votes1
answer1036
viewsHow to send messages at time intervals to a batch of emails
How do I get the loop to send every 10 emails or every X seconds? I want to prevent emails from falling into the spam list. And how can I get the code to read a file . txt with the listed emails and…
-
0
votes1
answer818
viewsImage in Database with Input File
Hello folks I am trying to put images in the database through FILE input, for image/port/mini and image/port/full paths. Form: <form action="recebe.php" method="POST"> <label>NOME DO…
-
0
votes1
answer72
viewsDoubt with select in mysql
Well I have the following tables: Requests id id_cliente id_vendador 1 10 20 2 10 30 3 10 20 Devotions Id data id_pedido 1 2017/01/01 3 I need to make a ? select' informing the ? id' of the order…
-
0
votes1
answer394
viewsHow to make an INSERT inside the while
Hello, How do I insert into a loop where id of the comment = id of the comment look at the code $selecionarComentarios = $conexao->prepare("SELECT a.id_mark, a.id_user, a.comment, a.rate, a.id,…
-
0
votes0
answers42
viewsTo switch from mysql to mysqli do I have to change the database?
If I have mysql database and in my php documents update to mysqli the database will continue the same?
-
0
votes1
answer64
viewsList the post owner and the last user you commented on. Mysql
Eai guys, I have the following query below, where I list all posts, amount of comments and the user who created it, but also wanted to list the last user who commented each post, will be able to do…
-
0
votes1
answer46
viewsCalling a database key for a user to choose in a Php form
<?php $link = mysqli_connect("localhost", "root", ""); $query = mysqli_query($link, "certificados"); ?> <form name="produto" method="post" action=""> <label for="">Selecione um…
-
0
votes0
answers253
viewsHow to work with dynamic form in jquery?
I wonder how I can work in a simple way with this dynamic form , type the categories comes from the database via jquery and ajax and appears on the screen as a form for the user to select your…
-
0
votes0
answers229
viewsHow to create database via sql and utf8_bin?
I have the following sql script: CREATE TABLE IF NOT EXISTS `pais` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(60) DEFAULT NULL, `sigla` varchar(10) DEFAULT NULL, PRIMARY KEY (`id`) )…
-
0
votes1
answer150
viewsQuery is returning an empty array (Mysql/Wordpress)
How do I get the field values meta_value = candidate of this table. I’m using this query, but it’s returning an empty array. $resultados2 = $wpdb->get_results( "SELECT * FROM $wpdb->usermeta…
-
0
votes2
answers206
viewsSelect does not work when clicking button
I’m looking for a contract at the bank, but when I click on Submit nothing is returned: Follow the code below: class Config{ // specify your own database credentials private $host = "localhost";…
-
0
votes1
answer1021
viewsINSERT and UPDATE in n:m relationship in Mysql
I need to create a n:m relationship in mysql, follow my example: I have a table called empresas and another representantes. An enterprise may have more than one representative, and a representative…
-
0
votes1
answer51
viewsQuery for Search Field
I need to make a query to search all records that have the term typed in a input, for example: Car, be returned blue car, green car, etc... My query current: $query = "SELECT * FROM veiculos WHERE…
-
0
votes0
answers33
viewsCreate pages with different parameters and then access it
I’m having the following difficulty: I’m trying to create a basic EAD platform where if the user has permission he can send a Vimeo video; put a description and katchaw In the case after he sends…
-
0
votes1
answer74
viewsWhat is the logic to make this select work?
How do I make this select display according to what is selected there among the options 'Most recent, Rating, Utility'?: The most recent would be the last comments added! The Evaluation would be the…
-
0
votes3
answers890
viewsMysql update of Empty columns only
Is there any way to do an Update in mysql where only let update the data if the column is empty. Imagine 4 radio input (the radios will be 1 at a time is not) Ai if a user(x) chooses radio 1 and…
-
0
votes0
answers37
viewsIs Mysqli safe against SQL Injection?
Well, recently I had to read a security article against SQL Injection, and saw that the same in the article recommended the connection and interaction of the database by PDO and not by mysqli. I…
-
0
votes1
answer32
viewsSelect - Time comparison does not work
I am trying to make a query to eliminate results in which the end time of the event is equal to 00:00:00, I made the query this way: select nome, local, hora_inicio, hora_fim, data_inicio, data_fim…
-
0
votes1
answer569
viewsSearch content according to filling two Combobox
On the home page of my site I need to have two combobox for the user to select options coming from the database (for example: selects the state in the first combobox and when selecting the state in…