/********** Somewhat new myself but I believe you can do something like SELECT (whatever you need) FROM tbl_users WHERE (UNIX_TIMESTAMP(now()) - ($days_last*24*60*60)) < UNIX_TIMESTAMP(dat_and_tim).
I will add the the PHP Cookbook and the MySQL Cookbook are godsends and that's where I got the solution. Grab a copy of these to help out - I've got a project due in a week and I'm using these non-stop. ***********/
Hey, Thanks its working like a charm now to get the number of days....but am still confused on how do I do the second comparision: selecting been sayyy 15th of Feb and 23rd of Feb.. any ideas?
Thanks, -Ryan
Again, I think you can convert each of the bookend dates to a unix-format time (time since epoch) in PHP (I assume that those dates aren't entered in the db) and then use that same UNIX_TIMESTAMP function on your table entries. Then pull entries out where the table values are between those two values.
--
Scott Plumlee
PGP Public key: http://plumlee.org/pgp/ D64C 47D9 B855 5829 D22A D390 F8E2 9B58 9CBF 1F8D
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]