having trouble trying select from a timestamp!
basically i'm trying to get totals form today. But I only have a time stamp to work with.
Here is what I have.
<php>
$year=DATE('Y');
$mon=DATE('m');
$day=DATE('d')-1;
$hour=DATE('H');
$min=DATE('i');
$sec=DATE('s');
$today= "$year-$mon-$day $hour:$min:$sec";
$resultstats4 = mysql_query("SELECT total FROM xactionsinfo where timestamp LIKE '%".$today."%'",$db);
while ($stats4 = mysql_fetch_array($resultstats4)){
$total4=$stats4["total"];
$grandtotal4 += $total4;
}
</php>
Thanks, Airric