mysql_fetch_objects
| From: | Trevor Lanyon | Date: | Mon, 15 May 2000 06:09:16 +0000 |
| Subject: | mysql_fetch_objects | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-18@lists.php.net to get a copy of this message | ||
I think this problem is a limitation of mySQL (yes, the computer's broken,
it's never MY CODE) however I'd love a second opinion:
I'm doing a left join on the same table twice, it contains addresses and
each person can have up to two addresses. The SQL looks like so:
select * from (tbl_user left join tbl_adds as tbl_work on user_work_add_id =
tbl_work.add_id) left join tbl_adds as tbl_home on user_home_add_id =
tbl_home.add_id where user_id = 20;
The SQL executes perfectly, however when I try to reference the fields using
the PHP routine mysql_fetch_objects, the field names have been repeated and
there is no way to distiguish between home and work.
Trevor Lanyon
ClearOption Technologies
http://www.clearoption.com