$query = $db->prepare("SELECT * FROM coupons WHERE deleted = ? LIMIT ?, ?");
$query->bindValue("1", 0);
$query->bindValue("2", 2);
$query->bindValue("3", 5);
try{
$query->execute();
$result = $query->fetchAll();
return $result;
}catch(PDOException $e){
die($e->getMessage());
}
Unfortunately this returns a result with no rows (but an empty result not even an error), and when I run this sql query through phpmyadmin, it fetches me multiple rows. Any suggestions would be really be helpful. I can't get through this.