//handles the listing of featured properties
$result = mysql_query("SELECT * FROM vehicles WHERE featured = 'Y';",$link);
while ($a_row =mysql_fetch_array ($result) )
{
//add commas to price
$a_row[price] = number_format ($a_row[price]);
print "";
//print "$a_row[title] ";
//select images connected to a given listing
$query = "SELECT * FROM tbl_Files WHERE prop_num = $a_row[id] LIMIT 1";
$output = mysql_query("$query",$link);
$count = 0;
while ($image_row =mysql_fetch_array ($output) )
{
print " ";
$count++;
}
if ($count == 0)
{
print " ";
}
print "$a_row[make] $a_row[model] ";
print "€ $a_row[price] ";
print "";
}
//END OF EXAMPLE
?>
|
|