|
Posted by Magzilla on 03/24/06 16:40
Another possible method to solve your problem. I demo it with following
example.
In case you have two tables tableA and table B, both of them have name,
id as table fields.
In stead of using "SELECT tableA.name, tableB.name FROM tableA, tableB
WHERE tableA.id=tableB.id",
You could use: "SELECT tableA.name AS Aname, tableB.name AS Bname
FROM tableA, tableB WHERE tableA.id=tableB.id",
And after your call to $sth=mysql_fetch_assoc(),
You could use $sth["Aname"] to reference to tableA.name. And
$sth["Bname"] to reference to tableB.name.
[Back to original message]
|