Sometimes you need to get only the date part from the TIMESTAMP.
You can use mysql date() function to do this
<?php
$today = date("Y-m-d"); //todays date
$query = "select * from tbl where DATE(c_timstp) = $today";
$result = mysql_query($query);
?>
Get Free Sinhala IT Learning Videos Kuppiya.com
thanks, great help
ReplyDeleteWeird, you posted this 3 years ago now two people are both thanking you almost within a couple of days of each other!
ReplyDeleteAnyway, thanks I was just looking how to do this!
nice post
ReplyDelete