combining to result sets

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

combining to result sets

Post by hame22 »

Hi I have 2 result sets generated by mysql queries

$result1, $result 2, how do I combine the 2 results to form just one set of results and then sort them by a particular field?

Thanks in advance
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

How so? You don't give much detail.

Like... You have table rows of a bunch of values, and you want to combine the corresponding values into one table row? That could be done using a loop if you make $result1=mysql_fetch_row($result1) and $result2=mysql_fetch_row($result2)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Hmm.. duplicate thread.

Locked.
Locked