下面是MySql查询:
$queryfilter = "SELECT * FROM tablename where sector = " .$_SESSION['idfilterdrop']. " AND
region IN (SELECT region from
tablename where sector = " . $_SESSION['sector'] ." OR region = " .
$_SESSION['r1'] ." OR theme = " . $_SESSION['theme'] .")";
帮我找出语法错误。我确定上述查询中存在双引号问题。当我在 MySql 提示符上运行此查询时,它运行良好,但是当我用变量替换常量值时,此查询不起作用。