[錯(cuò)誤代碼]
SQLSTATE[42000]: Syntax error or access violation: 1064 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 '&& attr_id=5' at line 1
{eyou:sql sql='select * from `ey_guestbook_attr` WHERE aid=$aid && attr_id=5'}<br><h2 style="font-size:16px;color:red;font-weight:bold;">昵稱:{$field.attr_value}</h2><br> {/eyou:sql}
是這樣寫么,按照大神的寫法就報(bào)錯(cuò)了,主要是數(shù)據(jù)都在一起,如何區(qū)分的。加上這個(gè) aid = $aid
就提示語(yǔ)法錯(cuò)誤