adzie Posted December 10, 2007 Share Posted December 10, 2007 hi, this script is designed to place information into a xml file. It transfers the information from the members database fine, but I was hoping for the group field to display the record it matches under the groups database ie member group = groups ID any thoughts? $query = "SELECT * FROM member_locations WHERE last_update > DATE_SUB( NOW() , INTERVAL 5 MINUTE ) ORDER BY number"; $result = mysql_query($query); $number = mysql_numrows($result); if ($number > 0) { for ($i=0; $i<$number; $i++) { $number = mysql_result($result,$i,"number"); $town = mysql_result($result,$i,"town"); $data['county'] = mysql_result($result,$i,"county"); $type = mysql_result($result,$i,"type"); $query = "SELECT * FROM members WHERE `member_number` ='$number'"; $getnam = mysql_query($query); if (mysql_numrows($getnam) > 0) { $data['title'] = mysql_result($getnam,0,"name"); $group ['group'] = mysql_result($getnam,0,"group"); } else{$data['title'] = "No Member Number"; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.