PHP Parse error: syntax error

This question already has an answer here:

  • PHP parse/syntax errors; and how to solve them? 13 answers

  • Change WHERE 'age' !="" to WHERE 'age' !=''

    Use

    $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/69652.html

    上一篇: 在PHP中锁定以实现政治部分

    下一篇: PHP解析错误:语法错误