Jump to content

Recommended Posts

I need to search for all the records that meet the included conditions and the timestamp is on today's date. Here is the sql query that I have so far:

 

$sql3 = mysql_query("select plan_sets_id from plan_sets where plan_sets_types_id = '3' and jobs_id = '16' and plan_sets_id != '125'");

Link to comment
https://forums.phpfreaks.com/topic/181821-query-the-db-by-date/
Share on other sites

Well thats not very much info on what you are actually trying to do. Are your storing it as a timestamp(php's time();), date, datetime? What conditions are you trying to meet? But just as a basic example you can simply do:

 

$query = "SELECT * FROM table WHERE time > $less_time and time < $more_time";

Link to comment
https://forums.phpfreaks.com/topic/181821-query-the-db-by-date/#findComment-958933
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.