Questions tagged as 'mysql'

1
answer

two-digit autoincrementable column

I have A tabla turns with a shift column that this car can be increased but I would like to place it with two digits. example: 01 02 03 ... 09 10 Any idea how to get there?     
asked by 24.07.2018 / 18:28
2
answers

Display data from two mysql tables in php

I want to show data from two tables from the same database on the same PHP page. One table is called "departures" and the other is called "dpartidos2". Now, I want to show a data that is called "match3" that is in "split2" My code:...
asked by 27.06.2018 / 23:06
1
answer

how do I fix this error "Notice: Trying to get property of non-object"

   Notice: Trying to get property of non-object in   C: \ xampp \ htdocs \ fairs-master \ fairs.php on line 84 <?php $rsFeriasMarcada = mysqli_query($link, "SELECT * FROM tab_ferias WHER...
asked by 28.08.2017 / 01:19
2
answers

Search records by criterion shows nothing

I do this query in PHP / MySQL and I want the records to be sorted by the nom field but it shows nothing. $stm = $BD->prepare("SELECT a.cod, a.nom, b.id_pago, c.planilla FROM sc_personal a, sc_condicion b, sc_planilla c WHERE a.id_condic...
asked by 05.09.2017 / 00:11
3
answers

Problem to update record with combobox?

I am updating a column of the database using <select> option but when executing the code it does not update the column. I'm using MySQL. Prueba1.php <html> <head></head> <body>...
asked by 12.06.2018 / 16:45
1
answer

How can I insert data into two or more tables at the same time?

I'm using $sql = "INSERT INTO factura (user_id, fecha) VALUES ($userid, '$date')"; $sql = "INSERT INTO boleto (sala, horario, asiento, user_id)" VALUES ('$sala', '$horario', '$asiento', $userid)"; mysqli_query ($conn, $sql);...
asked by 18.06.2018 / 17:54
1
answer

Mysql Transaction (Mysql)

I have a concern as I can improve this query. Well, I'm learning to use Transaction. one of my doubts is how can I use the rollback on error DELIMITER $$ CREATE PROCEDURE sp_insert_transaction( IN _id_usuario INT, IN _id_proveedor INT, IN _fec...
asked by 04.05.2018 / 17:47
2
answers

How do I check 2 mysql tables at the same time?

$sql = "SELECT * FROM 'zzzz_1_post' WHERE POST_autor=1; but I also want to get $sql = "SELECT * FROM 'zzzz_0_post' WHERE POST_autor=0; I'm doing it in a while, but I do not know how to combine the 2 tables at once. My tables: while($...
asked by 27.05.2018 / 03:22
1
answer

Query on PDO with error when doing echo

It turns out that I was testing some scripts considered "safe" to do SQL queries, I was interested, but I can not understand where the error is. It turns out that this script includes the fetch, and all that, so that it directly does% $consul...
asked by 29.05.2018 / 01:53
1
answer

join two data from the same field in MYSQL

I want to make a query in MYSQL that allows me to join two data in a field, the field is defined as an INT and I am doing the query by means of a where in but the problem is that it shows them to me but I have used several functions separately a...
asked by 23.03.2018 / 17:28