03-18-2017, 02:03 AM
I've almost mastered this...almost is keyword. I am trying to bind LIMIT variable. I'm testing this prior to using it for my pagnation. However, when I use the following statement, it returns an empty array:
But when I run:
It runs fine and returns a good array, but the point of PDO is to bind variable, I'm eliminating this purpose of I end up putting right into the statement.
Thoughts? Thanks in advance!
Code:
$q = $db->query("SELECT * FROM dates WHERE dateclosed = ? AND user_id = ? LIMIT ?", array(0,$uid,1));
But when I run:
Code:
$q = $db->query("SELECT * FROM dates WHERE dateclosed = ? AND user_id = ? LIMIT 1", array(0,$uid));
It runs fine and returns a good array, but the point of PDO is to bind variable, I'm eliminating this purpose of I end up putting
Code:
LIMIT $start,$finish
Thoughts? Thanks in advance!