i have a page that lists rows from a database called roster.php
when someone clicks the ID# of a member it fetches all the records submitted by that member from another table.
problem being is it will only fetch the data from the other table if it is submitted by anyone other than a specific person??
$querygs = "SELECT * FROM $table3 WHERE PilotID=$pid ORDER BY ID ASC";
echo $querygs;
$resultgs = mysql_query($querygs)or die(mysql_error());
while ($rowgs = mysql_fetch_array($resultgs)) {
$id = $rowgs['ID'];
$totime = $rowgs['StartTime'];
$LndTime = $rowgs['Landime'];
$from = $rowgs['From'];
$to = $rowgs['To'];
$acrft = $rowgs['Aircraft'];
$Hours = $rowgs['TotalHours']/60;
$fltno = $rowgs['flightno'];
$dati = $rowgs['DateTime'];
$query2 = "SELECT AirportName FROM $table5 WHERE icao='$from'";
$result2 = mysql_query($query2)or die(mysql_error());
while ($row2 = mysql_fetch_assoc($result2)){
$apname = $row2["AirportName"];
$query3 = "SELECT AirportName FROM $table5 WHERE icao='$to'";
$result3 = mysql_query($query3)or die(mysql_error());
while ($row3 = mysql_fetch_assoc($result3)){
$apname2 = $row3["AirportName"];
echo "<tr><td>$totime</td><td>$LndTime</td><td>$apname</td><td>$apname2</td><td>$acrft</td><td>$Hours</td><td>$fltno</td></tr>";
}}}
the table displays the records submitted by anyone else other than this guy, ive checked the records hes entered and they are in the exact format as ones submtted by other people?
following me?