query to select data between todays date as well as tomorrows date time upto specific time I have database "raj" with table "pagination"

In table pagination have "id", "actualtime" and "created" field

id - auto_increment
name- varchar
created- datetime


I want to display all rows which is created on todays date display upto yesterdays 06:00 pm.after that the content will be refreshed based on based on a DATETIME field called 'created' that holds the date and time of each record's creation.

this is my query to fetch rows but it is not working properly...plz help me......

$sql = "
    SELECT name 
    FROM pagination where created &gt;= DATE_SUB(CURRENT_DATE(),INTERVAL 1 DAY)
       ";
This is the expression for 6:00 PM yesterday

SELECT DATE(NOW()) - INTERVAL 6 HOUR;


Craft the SELECT with that expression

SELECT * FROM pagination WHERE
created &gt;= DATE(NOW()) - INTERVAL 6 HOUR;


Give it a Try !!!