php - MySQLi Syntax Error when selecting from db -
this question has answer here:
i'm getting syntax error block of code, , have no idea why. here specific error itself: "you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'match order id desc' @ line 1"
here php code block:
$bbcode = new bbcode; $sql = "select * match order id desc"; $res = mysqli_query($dbcon, $sql) or die(mysqli_error($dbcon)); $match = "";
match
reserved keyword in mysql: https://dev.mysql.com/doc/refman/5.0/en/keywords.html
to make code working change query to:
$sql = "select * `match` order id desc";
Comments
Post a Comment