Let's say, I I have this query in my postgresql.
SELECT * FROM logs WHERE user_id = 8328 AND punchin::date = '2013-06-11';
it returns successful.
But when I implent it in PHP:
$sql = "SELECT * FROM logs WHERE user_id = $user_id AND punchin::date = $date";
$record = pg_query($sql);
$row = pg_fetch_array($record);
var_dump($row) //false
what happened? how come I cant get the data?