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
answer1526
viewsData does not appear in phpMyAdmin
I’m having trouble sending the data passed by the form + php,and appear in the database.... When I go to phpMyadmin only the data that once I set up manual is not being dynamic to display in…
-
0
votes1
answer264
viewsBackdate in mysql
Good morning to you all! how do I, in a query in mysql, find the date related to 3 months ago?
-
0
votes1
answer243
viewsRenaming values in mysql
I have the following sql query: select nf,status from notas where status = 3 Instead of bringing the number 3 in the result of the sql query, I wanted to show another message: "completed". how do I…
-
0
votes1
answer331
viewsnow() date/time format in mysql
$verificatempo = mysql_query("SELECT * FROM logs WHERE horario <= now() - INTERVAL 10 MINUTE AND ip = '$ipaddress' ORDER BY horario desc limit 1"); I would like to know the same date and time…
-
0
votes1
answer28
viewsMysql ambiguous error
I’m having an error in my Select SELECT *, SUM(IF(debito_credito_financeiro = 'D', valor_financeiro, 0)) AS debito, SUM(IF(debito_credito_financeiro = 'C', valor_financeiro, 0)) AS credito, (SELECT…
-
0
votes1
answer70
viewsGet BD (Mysql) Rows - Webservice Mysql C#
I’m having a hard time getting Rows. It recognizes no variable within the cmdMySQL (@Login). I tried to put other but nothing if I take the @Login and put the value of email who is in the comic book…
-
0
votes2
answers4282
viewsProcedure Insert mysql
Good afternoon guys I’m not managing to create this trial and I don’t understand why, if you can help me. DELIMITER $$ CREATE PROCEDURE SP_INSERT_TB_ASS_TUR_AL(IN sp_id_disciplina INT, IN…
mysqlasked 8 years, 5 months ago Ulisses Gimenes 443 -
0
votes0
answers47
viewsLogic. Company with 2 stocks
I have the following Mysql table: `estoque_itensconsumo` ( `cod_itensconsumo` INT NOT NULL AUTO_INCREMENT, `unidade_mendida` VARCHAR(45) NULL, `estoque_atual` INT NULL, `quant_minima` INT NULL,…
mysqlasked 8 years, 5 months ago Rafael Silva 141 -
0
votes1
answer106
viewsProblem with ("select username, points from data order by points desc limit 10");
I am trying to make a ranking system, where the username and the score appear. I am doing as follows: $select = $mysqli->query("select username, pontos from data order by pontos desc limit 10");…
-
0
votes2
answers482
viewsConvert seconds to minutes
In the base date records the second onlines of each user, but it is numbers of type (example): 23631. I would like to convert these numbers into minutes, as I do? <?php $userstats_a =…
-
0
votes1
answer171
viewsHow to return 10 in 10 rows of select by clicking a php button
I have a lot of data in a database and need to display it in php. Since I have for example 100 lines, I won’t display them all at once because the page would be unstructured. The idea eh, display…
-
0
votes1
answer32
viewsHow to select between one hour and another in SQL
I need to solve a simple exercise asking to inform the amount of books sold between 13h and 17h30 of all dates. I was able to pull between 1:00 and 5:00 but not with the minutes "5:30". I did so:…
-
0
votes1
answer78
viewsPHP and Javascript - Adjusting Mysql Table Search (Doctrine Query)
I’m doing on my client page, which I took over from another developer, a section to search for events registered in the Mysql database. How is that page: <div id="detalhesBusca"…
-
0
votes1
answer318
viewsHow to update a table by going through another table in Mysql?
I have a scheme according to the picture below: The goal is to update the values of the seller_comission column in the table tbl_history. The table tbl_history already has a few thousand records.…
-
0
votes0
answers216
viewsCompare text file with database data
Good morning, I would like to know how to compare several txt files with Mysql, so when I create a txt file in the folder it does not re-enter the data of the other txt files in Mysql. I am using…
-
0
votes1
answer145
viewsPut 00 left into another variable
I have an HTML form that receives the number according to the ID registered in SQL and saved in another variable, but the ID is sequential and without zero left, example: ID 1 ID 2 ID 3 I needed to…
-
0
votes1
answer1909
viewsHow to concatenate the records of two columns?
Let’s say I have a table with two columns name and surname, for example: Nome | Sobrenome -------+----------- João | Silva Mike | Corin Carlos | Rodrigues And I want to join the column of the name…
-
0
votes2
answers164
viewsFirst visit message on the site
I have a system that every time the customer logs in, counts one more visit, and on the first visit a welcome message appears. But if the user reloads the page again or changes tab and goes back to…
-
0
votes2
answers809
viewsBreaking table into multiple pages
I am creating a web application that displays two tables of equal sizes However, both have about 100 lines each, I would like only 25 rows of each table to be displayed and to see the rest of the…
-
0
votes2
answers391
viewsError "1241 - Operand should contain 1 column" in Trigger that checks duplicities
I’m doing this Rigger to check if it already exists dados_id and referente_obs in the bank table But returns this error: 1241 - Operand should contain 1 column(s); BEGIN IF (NEW.id_dados and…
-
0
votes1
answer166
viewsCreate Mysql database at runtime
I am developing a Java registration application and I need this application to be executed to check if there is a database, if the database does not exist it creates this database and its tables so…
-
0
votes1
answer40
viewsError updating given with condition
I’m trying to run this update but it only updates the "value" column if the "discount" column is different from 0.00. If it is 0.00 he enters the second condition of the IF and puts in value the…
-
0
votes1
answer533
viewsUncaught Error: Call to Undefined Function
I’m having trouble validating Select, would be a login validation and I’m having trouble with Select . Fatal error: Uncaught Error: Call to undefined function select * from usuario where email='()…
-
0
votes1
answer298
viewsRecord Mysql PHP Radio Button
I have a system in PHP, Javascript and MYSQL where the person assembles your request... Link to the website It’s working properly, but I need to pass data to a report and I don’t know how to do…
-
0
votes0
answers187
viewsMysql query with grouping by day and time range
Good afternoon. I’m putting together a page with reports based on the amount of sales a bar has made. only if there is a problem. I need to generate a sales report per day until then I managed by…
-
0
votes2
answers305
viewsVector make a mysql query
Hello guys I’m trying to make a query using vector, but as far as I’ve learned the sql command does not hold the vector the way I’m doing so my result is empty variable.…
-
0
votes1
answer214
viewsMysql connection security using PDO, am I doing right?
It is safe to connect with Mysql only using the following form below? <?php function conectar() { $server = "localhost"; $dbname = "banco"; $dbuser = "usuario"; $dbpass = "senha"; try { $con =…
-
0
votes0
answers46
viewsProblem with mysql function mysqli_insert_id()
I have the following query: $ad="INSERT INTO comanda_aberta set numero='$a', data_abertura=NOW(), data_fechamento=NULL"; mysqli_query($con,$ad); $idcomandalast = mysqli_insert_id($con); when I print…
mysqlasked 7 years, 2 months ago Jasar Orion 2,233 -
0
votes1
answer5960
viewsHow to view data from a foreign key table in my main table?
In PHP as I do to appear instead of the foreign key id, appear the field that has the data? My group table has the column id_grupo and column grupo_nome. I have product table there have the product…
-
0
votes2
answers39
viewsCreate variables with database data?
I wish I had one while of a queryand fetch the data and create 3 variables separately with this information. For example: $sel_exclui=mysql_query("SELECT * from tabela order by id DESC LIMIT 0,3");…
-
0
votes2
answers41
viewsCheck if line in database exists, if not, restart query again
I have a database and would like to always fetch the value before, and I have used for example: I will fetch a news, and on this page there is a link to the previous news, and I will search for the…
-
0
votes0
answers10
viewsError on a trigger in Mysql
create trigger GatilhoRecebimento after insert on recebimentos for each row begin update caixa set valorcréditos_caixa = valorcréditos_caixa + new.valor_receb where caixa.cod_caixa =…
-
0
votes1
answer207
viewsRead json data inserted in mysql
I’ve seen many tutorials, and they all include [] but this one hasn’t, supposedly I’m missing something, can you help me ? In the database is id data, id being the base code for each product that in…
-
0
votes2
answers1248
viewsSum values returned from while
I have a table that has the column value, I query these values as follows $sql2 = 'SELECT * FROM comisao_trabalho WHERE idJob="10" && pagoA="Dalton" ORDER BY id ASC'; $buscar =…
-
0
votes0
answers30
views -
0
votes1
answer84
viewsPHP and Mysql - Putting textboxs into div
I’m trying a kind of reverse engineering with the use of PHP, Javascript and Mysql query. I am creating an event editing form registered in a bank table. In one of the fields, called Presence List,…
-
0
votes1
answer111
viewsWhat was the error in the last UPDATE use line in Mysql?
I developed a final project without error, done in Java, but still have only one error UPDATE in the last row of table creation clientes database in Mysql language. I am asking to update the…
-
0
votes1
answer329
viewsQuantity Inventory Management
Personal I am trying to do a stock control, my idea is when I consume a product it changes in the table. Ex: Estoque: Produto / Quant Caneta /5 Papel / 10 Lapis / 20 But when I separate these items…
-
0
votes2
answers211
views -
0
votes1
answer1096
viewsWhat is the correct type to store phone and address?
As the title says, what is the correct type and correct way to store phone and address, according to database normalization? In the case of phone, what is the correct type to store, the landline and…
-
0
votes0
answers111
viewsHow do I place the data of a php form in a Heidisql table
I have a contact form at php, when we submit an email with the entered data. What I wanted was to insert this data into a table in the program Heidisql. Form code: <div class="pagina"…
-
0
votes1
answer94
viewsRun Query according to selected Radiobutton
I have the following form: <?php echo"<fieldset>"; echo"<legend>OPÇÕES</legend>"; $query_menu = mysql_query("SELECT rm_id AS FUNCAO, rm_desc AS DESCRICAO, rm_obs AS OBSERVACAO,…
-
0
votes0
answers28
viewsDisplay the result of a content posted in a table in the mysql database where it already has its css.. but it does not work in the frontend
As I said above my script works perfect but when I call on the frontend $_POST['descricao']; She didn’t read the css that comes along with this variable. In the bank is registered like this:…
-
0
votes1
answer2398
viewsSynchronize two Mysql databases
I am developing a web application and would like to get the system working both online, how much offline. The idea is to keep a local database that responds when the user is offline, but I don’t…
mysqlasked 7 years, 2 months ago Gabriel Rodrigues 20 -
0
votes0
answers36
viewsConnection error in the Connection string
Hello, trying to connect my VS to Mysql by string connection I get every time error that the server was not found, as I should proceed? private void btnCadastrarConfirmed_Click(object sender,…
-
0
votes0
answers65
views -
0
votes1
answer87
viewsPicking last value of each ID according to highest end year
I have the following query: select f.id_user as user, f.id_tempo, t.ano_inicial, t.ano_final from fato as f inner join tempo as t where f.id_tempo = t.id_tempo; Which returns me the following table:…
-
0
votes0
answers443
viewsExport Mysql data to CSV file in UTF-8 format
I’m used to the tool Workbench to access data from my Mysql database, but when I try to export the returned data to a file *.CSV I am unable to export the same in the format UTF-8, but is exported…
-
0
votes3
answers1329
viewsSelect data with Between in Varchar format
I am redoing the question because I could not get the desired result, I would like to select in the field date but the between is not working, I believe it is due to my date field being in VARCHAR…
-
0
votes1
answer30
viewsDoubt mysql query + php
I generate a date in PHP and saved in the database: $today = date('Y-m-d H:i:s'); $timestamp = strtotime($today); In the bank she is saved in this format: 1474496101 When I make a SELECT in this…