This is how I query for one table (this query is executed correctly):
Code: Select all
$sql = "SELECT * FROM tab_en WHERE time > $from";
Code: Select all
$sql = "SELECT * FROM tab_en, tab_es WHERE time > $from";
Code: Select all
$sql = "SELECT * FROM tab_en WHERE time > $from";
Code: Select all
$sql = "SELECT * FROM tab_en, tab_es WHERE time > $from";
Code: Select all
$sql = "SELECT en.col1 AS c1en, en.col2 AS c2en, es.col1 AS c1es, es.col2 AS c2es FROM tab_en AS en, tab_es AS es WHERE time > $from";
Code: Select all
$sql = "SELECT en.col1 AS c1en, en.col2 AS c2en, es.col1 AS c1es, es.col2 AS c2es FROM tab_en AS en
LEFT JOIN tab_es AS es ON en.id = es.id
WHERE en.time > $from";