Jump to content

multi table search


adzie

Recommended Posts

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";

 

                    }

Link to comment
https://forums.phpfreaks.com/topic/81089-multi-table-search/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.