Help with PHP and MYSQL queries

I'm after a bit of help with php and mysql in that I need to combine 2 queries into 1

I am using userplane chat on my site and I am trying to populate bit of information which work fine when only 1 query is run.  If I try to run both, then the last query over rides the first (if that makes any sense)

 

The first query grabs things like Nickname, Sex, Role and Town so I can populate information within the chat - with Role determining if the user is an admin etc...... and works fine on its own.

// Fetch User Data - Nickname, Role, Sex, Town etc......
$sql = "SELECT * FROM Profiles WHERE ID=$strSessionGUID";
$gatherUsers = @mysql_query ($sql) or die('MySQL error: ' . mysql_error() . '<br>Query: ' . $sql);
 while($users=mysql_fetch_array($gatherUsers))

 

With this second query I need to pull some membership information from Dolphin Subcriptions so I can set how many cam they can view.
                    
//Fetch Membership Data - from Dolphin Subcriptions
$sqlmembs = "SELECT IDLevel FROM sys_acl_levels_members WHERE IDMember=$strSessionGUID";
$gathermembers = @mysql_query ($sqlmembs) or die('MySQL error: ' . mysql_error() . '<br>Query: ' . $sqlmembs);

while($membs=mysql_fetch_array($gathermembers))

 

Both work find on their own but not together, so I am thinking if I can combine them it may work.....

Anyone help shine some light on things.....

 

Many thanks

Mark

Quote · 10 Jun 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.