PHP解析错误:语法错误

这个问题在这里已经有了答案:

  • PHP解析/语法错误; 以及如何解决它们? 13个答案

  • 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

    上一篇: PHP Parse error: syntax error

    下一篇: FATAL ERROR syntax error, unexpected T