我收到此错误:
<br />
<b>Parse error</b>: syntax error, unexpected 'listings' (T_STRING) in
<b>C:\xampp\htdocs\android_connect\get_venues.php</b> on line
<b>30</b>
<br />
这是相应的PHP行:
$result = mysql_query(SELECT * FROM listings WHERE Venue_ID IN (SELECT Venue_ID FROM venues WHERE Venue_Name = $VenueName AND Region = $Region) AND Event_ID IN (SELECT Event_ID FROM events WHERE Event_Name = $VenueName AND Category = $Category);
任何人都可以解决我出错的问题吗?
提前致谢
答案 0 :(得分:2)
您忘了将字符串换成引号:
$result = mysql_query("SELECT * FROM listings WHERE Venue_ID IN (SELECT Venue_ID FROM venues WHERE Venue_Name = $VenueName AND Region = $Region) AND Event_ID IN (SELECT Event_ID FROM events WHERE Event_Name = $VenueName AND Category = $Category");