This topic is locked

How to control the MySQL query in the list page

5/5/2009 9:39:37 AM
PHPRunner General questions
N
neoaspilet11 author

Hello friends,
I have this trouble,
I have this database structure that each day has 24 -hourly schedules and each hour has a 75 slot items. So the database rows created per day is 24X75 + 24 +1 = 1825 rows per day. this is a huge number in a year.
Now how to control the MYSQL Query such that the only listed days are just say 7 days. and in order to view the previous days or future days, i'll just hit the page number.
Is there any way to control the list page Mysql query?
Thanks,
neo

Sergey Kornilov admin 5/5/2009

Modify SQL query on SQL query page:

SELECT ... FROM TableName

WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= DateColumn