Questions tagged as 'mysql'

3
answers

get the user name to show it once the session starts with php mysql html

I have a question with this code is that it does not show me the name of the user, in itself what I ask is how you can show the name of the user who started the session, and who appears in the corner of the website thanks to beforehand note:...
asked by 08.12.2018 / 21:17
1
answer

MySQL error 1054 on PhpMyAdmin Localhost

I have a proprietary table with customer data and another advance payment that is a table that stores information about the payments of the same. At the time of making a query to obtain and show (if the sum of all the payments of the month excee...
asked by 13.12.2018 / 07:16
1
answer

I will be able to do in my query a SELECT with a date range according to the current month

I have the following query: $analisis = "SELECT usuario, users.nombre AS 'nombre', users.email AS 'email', SUM(monto) AS 'monto_total', COUNT( usuario ) AS 'num' FROM pedidos...
asked by 20.11.2018 / 16:02
2
answers

Error in php query

I have the following code that should print me the amount of products registered in a table <?php require_once "js/conexion.php"; $sql = 'select count(idp) as total from producto'; $result = $mysqli->query($sql); if(!$r...
asked by 01.11.2018 / 06:42
2
answers

Print tables in Php form

Well, it happens that when trying to show the table "client" in my php form it is not generated, the problem is that it does not give me the origin of error. I've been looking for that error for a couple of hours and I can not find it. I have th...
asked by 17.10.2018 / 20:31
2
answers

Show last record entered, if it appears repeated

Today I bring a question about How to make a query? It turns out that I have a table called x, which has 3 or more records (ID, MAC, DATE_CREATION). Now I want to make a SELECT which selects a range of dates eg SELECT ID, MAC, FECHA_CRE...
asked by 25.10.2018 / 18:12
1
answer

Show message if php records do not appear

The problems that I present are the following, since I am trying that when I search for something it shows me what I am looking for but if it does not find anything then it shows a message of does not exist, the question is that it already shows...
asked by 22.10.2018 / 17:56
2
answers

How to customize the order of the results in MYSQL

I have a table where I keep the post of a forum I did with PHP and Mysql: CREATE TABLE 'sala_muro_temas' ( 'Id' int(11) NOT NULL AUTO_INCREMENT, 'categoria' int(11) DEFAULT NULL, 'id_clase' bigint(20) DEFAULT NULL, 'id_autor' bigint(20...
asked by 12.10.2018 / 22:46
1
answer

Error inserting into mysql DB with PHP PDO

I'm doing an insert with PHP PDO to a mysql database, I pass an array for the parameters, but it works and I get the following error SQLSTATE [HY093]: Invalid parameter number: parameter was not defined this is the connection method publi...
asked by 10.09.2018 / 00:03
2
answers

Update messages records to mark them as read

I have this process stored, I need to make several updates to mark messages as read. The problem is that only 1 update is done and there are messages marked as unread. CREATE DEFINER='root'@'localhost' PROCEDURE 'ShowMSG'(IN 'P_TO' INT, IN 'P_...
asked by 08.09.2016 / 18:17