Jump to content

Selecting DATA which is submitted 1 day before(yesterday)


darubillah

Recommended Posts

 

Hello,

 

I am trying to fetch data which is one day old,

 

I used now() function to insert current date,

 

What could be the query??

 

<?
//This query will select the data which is submitted today.
$sql="SELECT * FROM table_name WHERE date=". now();
?>

 

so what will be the query to fetch yesterday's records, should be some thing done with now() function

 

Thankyou

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.