Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: Martin Norland wrote: while (($row = mysql_fetch_row($result)) || ($row = mysql_fetch_row($result2))) { // just do it. รข } .. work (due to shortcircuiting)? and how ugly is it? // foo } That would work if you just wanted to iterate over both r

Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Martin Norland
Jochem Maas wrote: Martin Norland wrote: ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries i

Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Jochem Maas
Martin Norland wrote: ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case? You'r

Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Martin Norland
ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case? You're going to have to merg

[PHP-DB] Merge result set of query?

2005-03-09 Thread ioannes
My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case? John -- PHP Database Mailing List (http:/