0) and (strlen($PATH_INFO[1])>0)) { $alpha_code=substr($PATH_INFO[1],0,1); $alpha="and substring(winebar,1,1)='".substr($PATH_INFO[1],0,1)."' "; //echo $alpha; $PATH_INFO[1]=substr($PATH_INFO[1],1); //echo $PATH_INFO[1]; } if (!(strlen($PATH_INFO[1])>0)) { $Record=0; //echo "Record set to Zero"; } else { $Record=$PATH_INFO[1]; } $RecordMax=$Record+25; $query_Count="SELECT count(*) as WINERY_COUNT FROM TJ_WINEBAR where Publish_Flag='Y' ".$alpha." order by WineBar"; $dbresult_Count = mysql_query($query_Count, $dbconnect); $num_Count = mysql_num_rows($dbresult_Count); while ($row = mysql_fetch_array($dbresult_Count)) { $Winery_Count=$row["WINERY_COUNT"]; } $query="SELECT * FROM TJ_WINEBAR where Publish_Flag='Y' ".$alpha." order by WineBar limit ".$Record.", 25"; //echo $query; $dbresult = mysql_query($query, $dbconnect); $num = mysql_num_rows($dbresult); $table.="\n"; $table.="
A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z
All Wine Bars
\n"; $table.="\n"; $table.="\n"; $table.="
Profiled Wine Bars
"; $table.="\n"; $table.="\n \n \n \n \n \n"; $border=1; while ($row = mysql_fetch_array($dbresult)) { //Find and replace ' for strings $WineBar_ID=str_replace("'","'", $row["WineBar_ID"]); $WineBar=str_replace("'","'", $row["WineBar"]); $Action_Word=str_replace("'","'", $row["Action_Word"]); $Appetizers=str_replace("'","'", $row["Appetizers"]); $Dining=str_replace("'","'", $row["Dining"]); $Website=str_replace("'","'", $row["Website"]); $Description=str_replace("'","'", $row["Description"]); $Region=str_replace("'","'", $row["Region"]); $GPS_Coordinates=str_replace("'","'", $row["GPS_Coordinates"]); $Date_Established=str_replace("'","'", $row["Date_Established"]); $Propreitor=str_replace("'","'", $row["Propreitor"]); $Address=str_replace("'","'", $row["Address"]); $City=str_replace("'","'", $row["City"]); $Zip=str_replace("'","'", $row["Zip"]); $State=str_replace("'","'", $row["State"]); $County=str_replace("'","'", $row["County"]); $Country=str_replace("'","'", $row["Country"]); $Telephone=str_replace("'","'", $row["Telephone"]); $Fax=str_replace("'","'", $row["Fax"]); $Alternative_Telephone=str_replace("'","'", $row["Alternative_Telephone"]); $email=str_replace("'","'", $row["email"]); if ($border % 2) {$bordercolor="\"#FFFFFF\"";} else {$bordercolor="\"#F3F3F3\"";} $table.=" \n"; $border=$border+1; } $nextpage=$alpha_code.$RecordMax; if ($RecordMax<$Winery_Count) { $table.="
Wine BarCityRegionStateCountry
".$WineBar." ".$City." ".$Region." ".$State." ".$Country."
\n \n \n"; } $table.="
More Wine Bars (continued)...
\n"; ?> Tasting Journals - Featured Wine Bars