我对转义表名有一点问题。我太愚蠢了,我选择“显示”作为表名。当我使用 mysqli 连接时,转义工作正常,但它不适用于经典的 mysql 连接。有什么建议吗?对不起我的英语,我不是母语人士。
SELECT SQL_CALC_FOUND_ROWS year, nameShow
FROM `show`
LIMIT 0, 10
我得到错误
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 'show' at line 2 –
询问
$sQuery = "
SELECT SQL_CALC_FOUND_ROWS year, nameShow
FROM `show`
$sWhere
$sOrder
$sLimit
";