Code:
$db->from('users')->where('created_at > ?', date('Y-m-d'))->count();
Always shows 1
Although in the database the user's created_at value is 2024-12-03 00:00:00
var_dump($db->lastQuery); and var_dump($db->lastParam); shows:
string(48) "select count(*) from users where created_at > ?"
NULL
I checked and where really doesn't work with dates
Code:
$db->from('users')->where('created_at > ?', date('Y-m-d'))->count();
Always shows 1 Although in the database the user's created_at value is 2024-12-03 00:00:00 var_dump($db->lastQuery); and var_dump($db->lastParam); shows:I checked and where really doesn't work with dates