This question has been asked before.I have the following queries
$start=150;
$sql='select * from articles where category=? limit ?,5';
$query=$con->prepare($sql)
$query->execute(array($_GET['category'],$start));
and I am getting the error (due to quoting of 150):
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''150',5' at line 1.
This has been reported as a bug and later closed as bogus.What should I do now?Is there any workaround?
EDIT
Why I do not run into the same issue, when I have a query like
$sql='select * from articles where id=?';
$query=$con->prepare($sql);
$query->execute(array($id));