Vorrei sostituire la query in modo che mi dia tutti i record della tabella trld e so che serve una
left join ma nell'esempio che ho sul libro in ballo ci sono due tabelle, io invece ne ho tre...
$query_ld="select trld.i_ld,trld.name,trld.surname,trld.country,trld .nick,url.home_page
from trld,website,url
where trld.i_ld=website.i_ld and website.i_hp=url.i_hp
order by trld.name,trld.surname,trld.nick";
credevo di risolvere sostituendo con
$query_ld="select trld.i_ld,trld.name,trld.surname,trld.country,trld .nick,url.home_page
from trld left join website,url
on trld.i_ld=website.i_ld
where website.i_hp=url.i_hp
order by trld.name,trld.surname,trld.nick";
e invece mi da lo stesso risultato tralasciando i record di trld che non trovano abbinamento in website
le tre tabelle in questione hanno il seguente tracciato record
trld:
________________________________
| i_ld | name | surname | country | nick |
---------------------------------------------------------
website:
__________
| i_ld | i_hp |
------------------
url:
________________
| i_hp | home_page |
-----------------------------
P.S.: non è possibile annidare una query nella parte from anzichè nella parte where?