Fix a simple coding error on my site!
£10-20 GBP
Πληρώθηκε κατά την παράδοση
I have a site that uses Google Maps to show restaurants based on the customers postcodes. This was working fine, up until I updated the site. Now it gives me the error:
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FIND_IN_SET('CC11 1', REPLACE(REPLACE(postal_codes, ', ', ','), ' ,', ',')) >...' at line 34.
Here is the code im using.
$geocode_stats = file_get_contents("[login to view URL]".urlencode($address)."&key=AIzaSyBq_MpoR7_VALY64VHStOyOrvfpmvpAB_o");
$output_deals = json_decode($geocode_stats);
if(isset($output_deals->results[0])){
foreach($output_deals->results[0]->address_components as $cp){
if($cp->types[0] == 'postal_code'){
$pcode = $cp->long_name;
if(strlen($pcode) > 6){
$pcode = substr($pcode, 0, 6);
}
$and .= "FIND_IN_SET('".$pcode."', REPLACE(REPLACE(postal_codes, ', ', ','), ' ,', ',')) > 0 ";
}
}
}
if(empty($and)){
$and .= 'distance < ' . $home_search_radius . ' ';
}
Ταυτότητα Εργασίας: #26453059
Σχετικά με την εργασία
Ανατέθηκε στον:
hello I can fix this quickly; I have over 10 years in web development experience; and i can take care of the issue with the database giving the information
7 freelancers κάνουν προσφορές κατά μέσο όρο £23 για αυτή τη δουλειά
Let's debug that issue just now if you're available, you system should be back online in less than 1 hour.
Hello We have read your website issue please shares website details, we will fix your bug soon; please reply soon for start work now. We have professional team of website developers. Kindly message me to tell me deta Περισσότερα
Expert in Web Designing and Development, I can Built or revamp your Website with all of Requirements. Ready to start Work with you! Inbox me and let's talk to get started!