我想SELECT
从表中获取一些行,但这些行必须满足类似的条件column = value
。这是我的SELECT
声明:
$query = "SELECT t1.title, t1.introtext, t2.jr_street, t2.jr_city,
t2.jr_state, t2.jr_postalcode, t2.jr_country, t3.created, t3.name,
t3.title, t3.comments, t4.ave
FROM $table1 t1
LEFT OUTER JOIN $table2 t2 ON t1.id = t2.contentid
LEFT OUTER JOIN $table3 t3 ON t1.id = t3.pid
LEFT OUTER JOIN $table4 t4 ON t1.id = t4.reviewid
";
我尝试在语句WHERE
后添加子句FROM
,但出现 SQL 语法错误。