if ($Rov_pt_no != "") {
$sRov_pt_no = strtoupper("'$Rov_pt_no'");
$query="select * from $table where ROV_PT_NO=$sRov_pt_no";
$data="Rover part number $Rov_pt_no";
} else {
if ($LR_pt_no != "") {
$sLR_pt_no = strtoupper("'$LR_pt_no'");
$query="select * from $table where LR_PT_NO=$sLR_pt_no";
$data="Land Rover part number $LR_pt_no";
} else {
if ($Glng_pt_no != "") {
$sGlng_pt_no = strtoupper("'$Glng_pt_no'");
$query="select * from $table where GLNG_PT_NO=$sGlng_pt_no";
$data="Girling part number $Glng_pt_no";
} else {
if ($Luc_pt_no != "") {
$sLuc_pt_no = strtoupper("'$Luc_pt_no'");
$query="select * from $table where LUC_PT_NO=$sLuc_pt_no";
$data="Lucas part number $Luc_pt_no";
}
}
}
}
$result=msql($dbname, $query);
$rows=msql_numrows($result);
if ($rows > 1) {
echo "Warning: there is more than one entry for this part:\n";
echo "this early version of the database does not\n";
echo "yet handle parts with multiple cross references! Only\n";
echo "the first entry will be shown.
";
}
if ($rows == 0) {
echo "Data not found: this part number is not in the database\n";
echo "or is misspelt.\n
";
} else {
echo "
\n";
echo "Results of your search for $data | \n";
$f=0;
while ($f < msql_numfields($result)) {
$fieldname=msql_fieldname($result, $f);
$r=0;
$fielddata=msql_result($result, $r, $fieldname);
echo "$fieldname | $fielddata |
\n";
$f++;
}
echo "
";
}
?>