paragasu wrote: > is it possible to do it like SELECT *, UNIX_TIMESTAMP(post_date)-172,800 as is_new FROM tbl > $post = mysqli_fetch_object($sql); if($post->is_new) echo '<img src=new.gif">'; >From what I can tell, you'll just have a timestamp 2 days earlier than the actual post date in the is_new var. So unless the post date is 0000172800 or earlier it will eval to true. How about: SELECT *, UNIX_TIMESTAMP(post_date) as ts FROM tbl if($post->ts > (time()-172800)) { echo '<img src="new.gif">'; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php