include("dbinf.inc.php");
mysql_connect($sqladdress,$username,$password) or die(mysql_error());
@mysql_select_db($database) or die(mysql_error());
$query="
SELECT los_id, fname, lname, cel
FROM los
JOIN branches USING (branches_id)
WHERE branches_id='".$_GET['id']."'
";
$result=mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
mysql_close();
Basically, I only want to pull the branches_id and phone number field from the branches table.
With the code above I am going to be listing Loan Officers for a specific branch location ($id) and if they dont have a cell phone # I am going to be outputting the phone # of the branch. Obviously I am getting all of the branches table when I only want 2 fields :bemused:
Pardon me if there is an easy solution to this, I have searched and searched but cant figure this one out on my own. 😃
Thanks in advance!!