EFTEC / PdoOne

It is a simple library for PHP that simplify the use of the PDO extension.
https://www.eftec.cl
MIT License
108 stars 19 forks source link

Count doesn't handle where correctly #4

Closed ghost closed 8 months ago

ghost commented 8 months ago

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

ghost commented 8 months ago

Oh everything works, I made a mistake in the date