SELECT p.id AS pageid, t.* FROM aa_page p LEFT JOIN aa_translation t ON p.title=t.id