Jump to content

Recommended Posts

how about posting how you tried to implement that solution.

 

$result = mysql_query ("SELECT * FROM orders WHERE date_time(CURDATE(), INTERVAL 1 DAY) <= date ");

 

This one below work but it displays all orders and I want on orders made per day!

 

$result = mysql_query ("SELECT * FROM orders ORDER BY `date_time` ");

 

Yeah I know.

 

So do you see anything wrong with this:

$result = mysql_query ("SELECT * FROM orders WHERE date_time(CURDATE(), INTERVAL 1 DAY) <= date ");

 

? You did post it a few posts up.

 

THis works but is doing it manually and it only displays 1 order.. Im trying to display all orders made by a day. example display all orders made on '2009-05-10'

 

$result = mysql_query ("SELECT * FROM orders  WHERE `date_time`='2009-05-10 03:36:02' ");  

Well, here's the breakdown.

 

1. You replaced my DATE_SUB MySQL function with date_time.

2. You should replace date (at the end) with date_time instead.

3. Last, but certainly *NOT* least, Google! :)

 

tnx it works but still doesnt give me what I want..It still displays all the orders from different days.

 

$result = mysql_query ("SELECT * FROM orders  WHERE DATE_SUB(CURDATE(), INTERVAL 1 DAY) <= `date_time` "); 

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.