You need to use sql join query:
[php]$r = mysql_query(“select A.*, Adres, Zipcode from A left join B on A.Name = B.Name order by A.Name”);
while($f = mysql_fetch_array($r)){
echo $f[‘Name’];
echo $f[‘Telephone’];
echo $f[‘Adres’];
}
[/php]
ok this was a good start for me thankx already for this…
just 1 error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/pockta/domains/pockta.com/public_html/test2.php on line 23
Try to echo mysql_error() after the query, this will show you where you mistake.
In this query, you refer to fields in 3 tables, not just 2. This table needs to be defined after “FROM” too: producten_producten. Also you’re missing comma after this field t1.path
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Resource id #4’ at line 1
producten_leverancier.lleverancier,
producten_leverancier.ladres,
producten_leverancier.ltelefoon,
producten_leverancier.lwebsite,
producten_leverancier.lemail,
producten_leverancier.lname,
producten_leverancier.lpath
FROM producten_producten
left join producten_leverancier on producten_producten.leverancier = producten_leverancier.lleverancier where NOT ISNULL( producten_leverancier.lleverancier )");