I hope the title made sense.
ok ive got a table in a PostgreSQL database that has a few coloumns in it. What im tryting to do is the following:
<?php
$totaltimetodayresult = pg_query($link, "SELECT SUM(acctsessiontime) AS totaltime FROM radacct WHERE acctstarttime LIKE '%".$today."%'");
while($totaltimetodayarray = pgfetch_array($totaltimemonthresult)){
$totaltimetoday = $totaltimetodayarray['acctsessiontime'];
}
if($totaltimetoday == ""){
$totaltimetoday = 0;
}else{
echo "<li>Today - $".$totaltimetodayarray['totaltime']."</li>";
}
?>
Now this keeps coming back with it not liking the "LIKE" if I put single quotes around 'acctstarttime' it comes back with null.
acctsessiontime = timestamp with timezone (2010-07-27 09:08:27+12)
acctstarttime = bigint
$today = 2010-07-27
If anyone could shed some light or needs more info please ask
Cheers