[PHP-DB] 2 queries -- 1 array

2007-01-12 Thread Matthew Ferry
Hello, I need to query two different tables and create one BIG array. I can query both tables, but can't find a way to combine the results in one array. The problem comes in with the second table. It has a weird layout. The second table only has four fields. They are: contact_id,

Re: [PHP-DB] 2 queries -- 1 array

2007-01-12 Thread Matthew Ferry
of the first table Thanks... Matt - Original Message - From: Natalie Leotta To: Matthew Ferry Sent: Friday, January 12, 2007 3:41 PM Subject: Re: [PHP-DB] 2 queries -- 1 array I think this will help, but I'm not sure I understood your question correctly. http

Re: [PHP-DB] 2 queries -- 1 array

2007-01-12 Thread tg-php
Not sure if this is exactly what you're looking for, Matt, but I think it is. ?php $query = SELECT t1.NAME, t1.BUSINESS, t1.ADDRESS, t1.CITY, t1.PHONE, t2.CONTACT_NAME, t2.CONTACT_VALUE FROM Table1 as t1, Table2 as t2 WHERE t1.ID = t2.CONTACT_ID $result = mysql_query($query); while ($row =

Re: [PHP-DB] 2 queries -- 1 array

2007-01-12 Thread Matthew Ferry
- From: [EMAIL PROTECTED] To: php-db@lists.php.net Cc: [EMAIL PROTECTED] Sent: Friday, January 12, 2007 4:26 PM Subject: Re: [PHP-DB] 2 queries -- 1 array Not sure if this is exactly what you're looking for, Matt, but I think it is. ?php $query = SELECT t1.NAME, t1.BUSINESS, t1.ADDRESS, t1.CITY

Re: [PHP-DB] 2 queries -- 1 array

2007-01-12 Thread Matthew Ferry
=egw_addressbook_extra.contact_id Thanks... Matt - Original Message - From: [EMAIL PROTECTED] To: php-db@lists.php.net Cc: [EMAIL PROTECTED] Sent: Friday, January 12, 2007 4:26 PM Subject: Re: [PHP-DB] 2 queries -- 1 array Not sure if this is exactly what you're looking for, Matt, but I

Re: [PHP-DB] 2 queries -- 1 array

2007-01-12 Thread tg-php
they are linked to the first table thanks... Matt - Original Message - From: [EMAIL PROTECTED] To: php-db@lists.php.net Cc: [EMAIL PROTECTED] Sent: Friday, January 12, 2007 4:26 PM Subject: Re: [PHP-DB] 2 queries -- 1 array Not sure if this is exactly what you're looking for, Matt, but I think