我有这样的PHP代码运行时不执行 - :SET和SELECT查询在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
。但是令人惊讶的是,当相同的mysql查询在phpmyadmin中运行时,它会根据需要运行。
最新情况?感谢您的帮助......
'*'是储户mysql符号 – samayo 2013-03-23 20:09:10