I sure do. Thanks.
here it is (I'll try and keep it as lean as I can)
//mySQL Query THIS FINDS THE ZIPCODES THAT ARE WITHIN A CERTAIN DISTANCE
$sql = "SELECT DISTINCT ZIPCode, Longitude, Latitude FROM zipCodes WHERE
Latitude >= $minLat
AND Latitude <= $maxLat
AND Longitude >= $minLong
AND Longitude <= $maxLong";
if (!$result = mysql_query($sql)) {
//Error in mySQL query
print "There was an error in sql statement, ".mysql_error()."<br><b>$sql</b>";
exit;
}
else {
$zcdDistance = new DistanceAssistant;
while ($myrow = mysql_fetch_array($result)){
$Distance = $zcdDistance->Calculate($Latitude,$Longitude,$myrow["Latitude"],$myrow["Longitude"]);
if ($Distance <= $Miles){
//this ZIP Code is within $Miles of $ZIPCode
//Here is where I pass the chosen ZIPCODES into another SQL
$zc = $myrow["ZIPCode"];
$sql = "SELECT * FROM vendors WHERE zip_code = '$zc' limit 0,10";
//As vendors are selected depending on each passed xipcode they are displayed. If there are more than ten then the limit works. If there are not then the while statement reiterates and passes another zipcode. So, the page displays values for zipcodes until it the query gets one that has more than 10 associated vendors.
$newresult = mysql_query($sql,$dbConn) or die ("NO WAY.");
while ($newrow = mysql_fetch_array($newresult))
{
$name= $newrow["name"];
$address = $newrow["address"];
$phone = $newrow["phone"];
$desc = $newrow["description"];
$vendor_menu = $newrow["vendor_show"];
Well there it is.
I can't fiqure out how to display 10 per page short of using a simple count loop as I print the results but then I can't go back and forth between pages without starting the count over each time.
Thanks for the help in advance,
fresca