Questions tagged as 'mysql'

1
answer

how to make a query to show the average of the previous day with php and mysql

I have a query which shows me the average of the previous day of a column: $date = date("Y-m-d"); $estacion=2; $sql="SELECT AVG(TS) as TSprom FROM sensores WHERE date<'$date' "; so far so good, but when I put the id...
asked by 03.11.2017 / 03:47
1
answer

check the manual that corresponds to your MySQL server version 5.5 workbench [closed]

When I run the class Test01, the following error appears: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=' CLIENT '' at line 1 CounterModel package mo...
asked by 26.10.2017 / 01:27
2
answers

Error registering PHP MYSQL user

I have a problem when attempting to register users to the php with mysql, the code is this: $server = 'server'; $bd = 'basedata'; $user = 'usuario'; $pass = 'password'; $conexion = new mysqli($server,$user,$pass,$bd); if (mysqli_errno()){...
asked by 26.10.2017 / 17:20
0
answers

Which query is faster?

Good morning. I need to make an update to a table (table a) of 50000 records from a table (table b) of 200000 records where I look in table b for all the records that match table a. I have these two questions: UPDATE data_0_pagos a INNER...
asked by 26.10.2017 / 21:14
1
answer

Display contents of a MySQL table in a form as options

good day. I have a table that has two fields, gender_number and description. I can not find the way to show the contents of the table in a form using the select option. How would it come to be? Thank you very much.     
asked by 22.10.2017 / 22:35
2
answers

PDO - UPDATE - PHP

I have a problem with an UPDATE, to simplify the data I take it from a form and they pass it as parameters to a function, I do the UPDATE and when it does the execute () it tells me that if it was done, but it never does the modification....
asked by 24.10.2017 / 01:55
0
answers

Pdo Exception (Mysql) does not detect custom errors

I'm doing maintenance in PHP (PDO) to a table using a Store Procedure (Mysql) in a certain situation I throw an exception from Mysql in the following way: SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT='Cheque cobrado, no se puede anular.'; in PH...
asked by 30.10.2017 / 21:53
0
answers

query for time intervals in mysql

The problem is as follows, I have a table: filter-log that stores data extracted from an activity log file with the following fields: id_log, ip, fecha, hora, consulta, code . I show you some records: 1, 190.168.65.45, 2017-10-13,...
asked by 24.10.2017 / 21:21
0
answers

Account by default when accessing MySql

An apology, I am not very knowledgeable about the subject and if I do not specify something, I will gladly let you know. Attached image where when entering the MySql console tries to access a default account that is not 'root' is a user who h...
asked by 20.10.2017 / 22:54
1
answer

database and programming

Because I get this error when trying to open phpmyadmin with xampp I hope you can help me is very urgent     
asked by 02.11.2017 / 15:35