Jump to content

[SOLVED] return a date range - now() interval?


beachdaze

Recommended Posts

In a live call log, we have three areas, verified for today, un-verified for today and un-verified older.  I need the older to only show the last 3 days of entries. 

 

This is a sample of the code;

$query_SearchAllUnverified = "SELECT * FROM dish WHERE date!=('$currentdate') AND status='UN-VERIFIED'";

 

Which returns all past date entires.

 

I have tried using the now() function;

$query_SearchAllUnverified = "SELECT * FROM dish WHERE date=(NOW() - INTERVAL 3 DAY) AND status='UN-VERIFIED'";

 

Which returns a blank document.  I have placed every variation of single quotes I can think of in the bottom sample, but nothing returns data. 

 

Any advice please?

Link to comment
https://forums.phpfreaks.com/topic/85230-solved-return-a-date-range-now-interval/
Share on other sites

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.