Hi All

This is my first post of possibly many to this list. I am having a
problem with trying to display time related content to a page. I
initially setup the column with a 10 digit timestamp but found out that
the date_sub function works with DATESTAMP data type. I only have 8 rows
of test data in the table so I didn't loose anything valuable but now
the column isn't automatically putting in the date in the format that I
need.

I suppose the question is where do I go now and is the following query
using the correct syntax?

if ($type == "newtoday"){
$sql_text = ("SELECT * FROM kawarthas, Customer WHERE
kawarthas.timestamp< (date_sub(now()+0, interval 2 DAY)) &&
(kawarthas.agent1aid=Customer.MemberID) ORDER BY price;");
}
if ($type == "newthisweek"){
$sql_text = ("SELECT * FROM kawarthas, Customer WHERE
kawarthas.timestamp<= (date_sub(now()+0, interval 7 DAY)) &&
(kawarthas.agent1aid=Customer.MemberID) ORDER BY price;");
}


--
Cheers!
Ken Tuck
EyeCreate Inc.
Net~Solutions
Design - Hosting - E-Commerce
[EMAIL PROTECTED]
http://www.eyecreate.net/
ph: 705 755-1120
fx: 705 743-9259



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to