Questions tagged as 'mysql'

3
answers

How to remove Sundays in a range of dates in Mysql?

I would like to know if there is any way in mysql to remove Sundays from a range of dates ie    Fecha inicIal : 2017-08-01 ( Y-m-d)    Fecha Final : 2017-08-31 ( Y-m-d) number of days: 31  number of Sundays...
asked by 01.08.2017 / 20:25
1
answer

multiple sums in the same table

I have the following problem, I have 1 table in mysql where I have the information of people who have a debt from a clothing store for several years, what I want is a query that gives me the name of the person and that adds up your debt. Exam...
asked by 03.06.2016 / 22:32
4
answers

Obtain the maximum value of a field, from a series of records. MYSQL

The query is as follows, there are 2 tables: Pagos -idPago -idCliente -fechaEnQuePaga -fechaVencimiento Cliente -idClient...
asked by 24.11.2017 / 20:35
1
answer

How to calculate the difference in hours between these dates? MySQL

The starting time and date is: 2007-12-31 23:59:59 and the end time is: 2018-03-06 17:44:09, I want to calculate the difference of hours between these dates. I thought that with the hour it was enough, but no, you have to calculate the days too...
asked by 06.03.2018 / 19:23
1
answer

How to restart the auto_increment of MYSQL?

Good morning. I'm doing a little job with PHP, and I need help removing a record from a table. I insert data, and then I delete them, but the auto_increment continues in the last inserted position. I want that when deleting a data, the auto_incr...
asked by 30.05.2016 / 04:53
2
answers

avg of each day

I need to get the average of each day, in a range of one week, what I need is for the query to return 7 rows where each row is 1 day of the week I have the structure of the table is the following: create table mediciones( id int not nu...
asked by 26.09.2018 / 02:06
4
answers

NULL the duplicate values of a LEFT JOIN Msql query

I have 2 tables. The first returns the order number and the two-state times Pedido TiempoPreparar TiempoAsignar ------------------------------------------- P001 10 9 P002 20 5 P003...
asked by 03.05.2018 / 19:21
0
answers

MYSQL / PHP / JQuery query assistant

I am working on a report that shows the results of an SQL query in an HTML table I can get the data very easy with PHP $link=new PDO('mysql:host=localhost;dbname=dbname','user','pass',array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));...
asked by 02.09.2018 / 19:56
1
answer

Problems with MySQL in XAMPP

Every time I press start on the MySQL button in XAMPP , I find this message: Status change detected: running 16:21:27 [mysql] Attempting to start MySQL app... And it does not happen there, how can I solve it?     
asked by 25.09.2018 / 00:25
1
answer

Excessive response time between MySQL and PHP

I am making an application which validates certain user data by checking if the provided data exists in the database, the responses of the database can take at least 3 seconds, but making the queries directly in the database , the answers are im...
asked by 13.10.2018 / 01:39