Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.