Hi all,
I use the results of one query to get results from another...
// Process Results
while ($row = mssql_fetch_assoc($result))
{
// Declare FFNumber Variable
$ffnumber = $row['ffnumber'];
/***********************
Get Staff Details
***********************/
include('../../staff_db_connect.php');
// Perform query
$queryz = "SELECT FirstName, SurName ".
"FROM EMPLOYEES_Registered ".
"WHERE FFNumber = '$ffnumber' ".
"ORDER BY SurName";
$resultz = mysql_query($queryz) or die(mysql_error());
//echo $queryz;
// Process Staff Results
while($rowz = mysql_fetch_array($resultz))
{
// set name variables
$firstname = $rowz['FirstName'];
$surname = $rowz['SurName'];
}//echo '<h2>'.$surname.'</h2>';
/*******************************************
*******************************************/
Then the below array is created. How do I get $firstname and $surname into the array??
$items = array();
$items[] = $row;