';
?>
echo ' ';
echo mysql_result($result, $j,'stylename') . ' ';
echo 'Price: $' . mysql_result($result, $j,'yourprice') . '.00';
?>
}
if($rows == 0){
echo "None of the items requested are in stock at this time, check back soon!";
}
} else if ($product == '') {
echo "";
} else {
// build and execute and array
$query = "SELECT * FROM products WHERE product ='$product' AND available = 'yes' ORDER BY `id` ";
$result = mysql_query($query);
if(!$result) die ("Database access failed:" . mysql_error());
// fetching a result
$rows = mysql_num_rows($result);
for ( $j=0 ; $j<$rows ; $j++){
$id = mysql_result($result, $j,'id');
$productnum = $id;
?>
echo ' ';
echo mysql_result($result, $j,'stylename') . ' ';
echo 'Price: $' . mysql_result($result, $j,'yourprice') . '.00';
?>
}
if($rows == 0){
echo "None of the items requested are in stock at this time, check back soon!";
}
}
?>
|