Sebastian
|
| Posted: 10/04/2002, 10:41 AM |
|
Please help im in trouble 
i want to use my own mysql string to become my data from the mysql table. with this string i want to become some date sorted. this is my string:
SELECT title, term_id, datum FROM term_story WHERE datum/86400>=1033750338/86400
asume that the 1033750338 is the actual unix timestamp. what i need is, to pass automaticly the actual Unix timestamp in place of 1033750338. i have tried to use this:
SELECT title, term_id, datum FROM term_story WHERE datum/86400>=time()/86400, but his produces a MySQL error.
Is there a solution ? Please help as fast as you can. Many thanks ..
|
|
|
 |
Nicole
|
| Posted: 10/07/2002, 6:35 AM |
|
Sebastian,
in case you're using PHP you can include php time() function inside the query, e.g.:
$sql = "SELECT title, term_id, datum FROM term_story WHERE datum/86400>=".time()."/86400";
|
|
|
 |
|