我有这个php代码-:
$q = "SET @session = '1', @buddys = '12,7,10', @rejects = 'post_0'; SELECT f.* FROM feed as f"; $r = mysqli_num_rows($q);.
这会导致此错误 -: 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 'SELECT f.* FROM feed as f' at line 3
。
但令人惊讶的是,当在 phpmyadmin 中运行相同的 mysql 查询时,它会根据需要运行。
怎么了?感谢帮助...