Greetings...
Could someone give me some advice abut this piece of code..
I am abel to retrieve the listings from the database but it doesnt give the particulars about each field//
Instead of displaying the name of the actual company city or webpage it just says company city and webpage for the number of retreived results... any idea what I am doing wrong ..ben pulling my hair out (dont have much left ... 🙂
Thanks for your time and response in advance ..much blessings for your help ...phpmysql rules
$query= ("Select 'company', 'city' ,'webpage' from lexus_dealers where state = '$state' ");
$result = mysql_query ($query);
$num_results = mysql_num_rows($result);
echo "<p>There are currently $num_results dealers in the state of $state .<br>";
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo htmlspecialchars(stripslashes($row["company"]));
echo htmlspecialchars(stripslashes($row["city"]));
echo htmlspecialchars(stripslashes($row["webpage"]));
}
mysql_close ($link);