I want to SELECT
a some rows from a table, but these rows must satisfy a condition like column = value
. Here's my SELECT
statement:
$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
";
I tried adding a WHERE
clause after the FROM
statement, but I am getting an SQL syntax error.