Jump to content

[SOLVED] displays in php


TGM

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` "); 

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.