PHP解析错误:语法错误
这个问题在这里已经有了答案:
将WHERE'age'!=“”更改为WHERE'age'!=''
使用
$query = mysqli_query($con, "SELECT a.* FROM (SELECT `id` as `id`, `age` as `age` FROM `register` WHERE `age` !='') as a INNER JOIN (SELECT `one` as `f1` FROM `friends` WHERE `two`='".$my_id."' UNION SELECT `two` as `f2` FROM `friends` WHERE `one` = '".$my_id."') as b ON a.id=b.f1");
你应该在这里避免双引号
WHERE `age` != ""
链接地址: http://www.djcxy.com/p/69651.html