Adding extra data to a Variable
- by DogPooOnYourShoe
Right now, my code plucks out only one value using Mysql. So I thought I might aswell add each found result to a variable, however I dont know how to do this.
This must be a very basic question, but I cant find a answer for it
echo '<table border="1">';
echo "<tr><td><b>Surname</b></td><td><b>Title/Name</b></td><td><b>Numbers</b></td><td><b>Telephone</b></td><td><b>Edit</b></td><td><b>Del</b></td></tr>\n";
while ($row= mysql_fetch_array($result)) {
$Surname = $row["Surname"];
$Title = $row["TitleName"];
$Email = $row["Email"];
$Telephone = $row["Telephone"];
$id = $row["id"];
$MooringNumbers = $row['Number'];
$Assignedto['AssignedTo'];
}
$MooringQuery = "select * FROM mooring WHERE AssignedTo='$id'";
$MooringResult = mysql_query($MooringQuery) or die("Couldn't execute query");
while ($row1= mysql_fetch_array($MooringResult)) {
$AssignedTo = $row1["AssignedTo"];
$MooringNumbers = $row1["Number"];
echo '<tr><td>' .$Surname.'</td><td>'.$Title.'</td><td>'.$MooringNumbers . '</td><td>'.$Telephone.'</td><td>' . '<a href="rlayCustomerUpdtForm.php?id='.$id.'">[EDIT]</a></td>'.'<td>'. '<a href="deleteCustomer.php?id='.$id.'">[x]</a></td>'. '</tr>';
}