我有這樣的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