the beginning query " . $sql2 . " > end of query

"; echo "this is the bottom of the view state count function"; $sql2 = 'SELECT COUNT(DISTINCT bizState) FROM ' . $databaseNiche . ''; // orig $sql2 = 'SELECT COUNT(DISTINCT bizState) FROM ' . $databaseNiche . ''; // echo $sql2; // orig -> $result2 = mysqli_query($sql2); $result2 = mysqli_query($con, $sql2); $row2 = mysqli_fetch_row($result2); $num_of_items = $row2[0]; $theItemTotal = $num_of_items / 4; $totalDividedBy4 = round($theItemTotal,0); // echo "the total amount is " . $totalDividedBy4; return $totalDividedBy4; } // ViewStateCount(); // echo "top of view states function"; function ViewStates1() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4, $SatelocationIconLG, $stateLocationIconStyleLG, $con, $query; $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT 0, $totalDividedBy4"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { $countminusone = $row['COUNT(bizState)'] - 1; echo "
" . trim($row['bizState']) . "
\""
"; } } function ViewStates1ORIG() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4, $SatelocationIconLG, $stateLocationIconStyleLG, $con, $query; $query = mysqli_query($con,"SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT 0, $totalDividedBy4"); // echo $query; // ORIG: $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT 0, $totalDividedBy4 "; // $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT 0, $totalDividedBy4 "; // echo $query; exit(); $result = mysqli_query($query); // echo $query; exit(); while ($row = mysqli_fetch_array($result, MYSQL_ASSOC)) { $countminusone = $row['COUNT(bizState)'] - 1; echo "
" . trim($row['bizState']) . "
\""
"; } } function ViewStates2() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4, $SatelocationIconLG, $stateLocationIconStyleLG, $con; $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT $totalDividedBy4, $totalDividedBy4"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { echo "
" . trim($row['bizState']) . "
\""
"; } } function ViewStates2ORIG() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4, $SatelocationIconLG, $stateLocationIconStyleLG, $con; // $queryORIG = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT $totalDividedBy4, $totalDividedBy4"; $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT $totalDividedBy4, $totalDividedBy4"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { echo "
" . trim($row['bizState']) . "
\""
"; } } function ViewStates3() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4, $totalDividedBy4NEW, $SatelocationIconLG, $stateLocationIconStyleLG, $con; $totalDividedBy4NEW = $totalDividedBy4 + $totalDividedBy4; $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT $totalDividedBy4NEW, $totalDividedBy4"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { echo "
" . trim($row['bizState']) . "
\""
"; } } function ViewStates3ORIG() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4, $totalDividedBy4NEW, $SatelocationIconLG, $stateLocationIconStyleLG, $con; $totalDividedBy4NEW = $totalDividedBy4 + $totalDividedBy4; $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT $totalDividedBy4NEW, $totalDividedBy4"; /// echo $query; $result = mysql_query($query); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "
" . trim($row['bizState']) . "
\""
"; } } function ViewStates4() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4NEW, $totalDividedBy4, $SatelocationIconLG, $stateLocationIconStyleLG, $con; $totalDividedBy4NEW2 = $totalDividedBy4NEW + $totalDividedBy4; $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT $totalDividedBy4NEW2, $totalDividedBy4"; $result = mysqli_query($con, $query); while ($row = mysqli_fetch_array($result)) { echo "
" . trim($row['bizState']) . "
\""
"; } } function ViewStates4ORIG() { global $pageName, $mainKeyword, $databaseNiche, $mainKeyword, $totalDividedBy4NEW, $totalDividedBy4, $SatelocationIconLG, $stateLocationIconStyleLG, $con; $totalDividedBy4NEW2 = $totalDividedBy4NEW + $totalDividedBy4; $query = "SELECT bizState FROM " . $databaseNiche . " GROUP BY bizState ORDER BY bizState ASC LIMIT $totalDividedBy4NEW2, $totalDividedBy4"; // echo $query; $result = mysql_query($query); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "
" . trim($row['bizState']) . "
\""
"; } } // BEGIN GEO IP FUNCTIONS /* file_get_contents do the "GET" */ // file from freegeoip.com $theUserIpAddress = $_SERVER['REMOTE_ADDR']; // testing ::::::::::::: // $theUserIpAddress = '173.245.64.80'; // san jose ip address for testing // $jsonReceived = @file_get_contents('http://freegeoip.net/json/'.$theUserIpAddress); // check to see if the files exists from the server :::::::::::: if($jsonReceived) { // // and if result if it doesnt exist in the db // detected loction img icon in popup // maybe add logic to display if user location matches state page selected // diff icon for your location and icon for area /* Array from json */ $results = json_decode_nice($jsonReceived); $thePartsArray = array($results); // define the variables and names to defined varname for usage foreach($thePartsArray[0] as $key=>$value) { $$key = $value; } $userState = $region_code; $userCity = $city; // $city = 'test'; // print_r($thePartsArray); } else { // hide map if file not there $displayMap = 'NO'; } /* function to decode json with whitespaces or not used for map json above */ function json_decode_nice($json, $assoc = FALSE){ $json = @str_replace(array("\n","\r"),"",$json); $json = @preg_replace('/([{,])(\s*)([^"]+?)\s*:/','$1"$3":',$json); return @json_decode($json,$assoc); } // END GEO IP FUNCTIONS function displayLatLongListings22() { Global $table, $state, $city, $bizName, $myLongitude, $myLatitude, $bizID, $bizCity2, $bizAddr, $locationsMapsPageName, $userState, $userCity, $bizPhone; if($userState == 'CA') { $query = "SELECT * FROM $table where bizState LIKE '%$userState%' AND bizCity LIKE '%$userCity%' ORDER BY myLatitude ASC "; } else { $query = "SELECT * FROM $table where bizState LIKE '%$userState%' ORDER BY myLatitude ASC "; } // $query = "SELECT * FROM $table where bizState LIKE '%$userState%' ORDER BY myLatitude ASC "; // echo $query; $result = @mysql_query($query); while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)) { $bizPhone = $row['bizPhone']; // $bizState = $row['bizState']; $bizCity2 = ucwords(strtolower($row['bizCity'])); $bizAddr = ucwords(strtolower($row['bizAddr'])); $bizName = $row['bizName']; $bizName = str_replace("'", "", $row['bizName']); $myLongitude = $row['myLongitude']; $myLatitude = $row['myLatitude']; $bizID = $row['bizID']; echo "L.marker(["; echo $myLongitude; echo ","; echo $myLatitude; echo "], {icon: foodMarker})"; echo ".addTo(map).bindPopup('"; echo $bizName . " located at:
" . $bizAddr ."
". $bizCity2 . " " . $bizPhone; echo "
Get Directions '); "; } // echo "the city is " . $city; } function turnOnorOffMap() { Global $table, $state, $city, $bizName, $myLongitude, $myLatitude, $bizID, $bizAddr, $bizCity, $locationsMapsPageName, $userState, $userCity, $displayMap, $con; // $query = "SELECT bizID FROM $table where bizState LIKE '%$userState%' ORDER BY myLatitude ASC "; $query = "SELECT bizID FROM $table where bizState LIKE '%$userState%' ORDER BY myLatitude ASC "; // echo $query; $result = @mysqli_query($con, $query); while ($row = @mysqli_fetch_array($result, MYSQL_ASSOC)) { $bizID = $row['bizID']; } if(!$bizID) { $displayMap = 'NO'; } } ?>
'; // enter div style elements // echo '
'; /* echo " $adName
Get $$dealAmount $adDescription

"; */ // echo "
"; } // select query to display end // start: function to write the view count to the db @$sqlViewCount = 'SELECT viewCount FROM ' . $databaseNiche2 . ' WHERE autoID = ' . $theID . ' '; @$sqlViewCountresult = mysqli_query($con2, $sqlViewCount); if (@$ViewCountRow = mysqli_fetch_array($sqlViewCountresult)) { $viewCount = $ViewCountRow['viewCount']; $updatedViewCount = $viewCount + 1; } $sqlViewCountUpdate = 'UPDATE ' . $databaseNiche2 . ' SET viewCount = ' . $updatedViewCount .' WHERE autoID = ' . $theID . ' '; // echo " the sql query is " . $sqlViewCountUpdate . " !!"; @$sqlViewCountUpdateresult = mysqli_query($con2, $sqlViewCountUpdate); // echo "the view count update result is " . $sqlViewCountUpdateresult; // if ($ViewCountUpdateRow = mysqli_fetch_array($sqlViewCountUpdateresult)) { // echo " if view count call"; // } // end: function to write the view count to the db } // end displayAd function ?>

Flea Market Locations

Featured Flea Market People Flea Market in Atlanta, GA.