Jump to content

Recommended Posts

Ok here is the reason I have made some code to turn the maxminds geocountry lite csv file in to an SQL file the. Reason I need to replace ' and also I need to replace , to an HTML code is because of those annoying country names like 'Korea', republic of' SQL seperates everythig by a ' and a , so i need to replace some ''s with an HTML code

 

Link to comment
https://forums.phpfreaks.com/topic/200608-str_replace-problem/#findComment-1052725
Share on other sites

I know there is a better way of doing it than swaping out the character, but I can't remember how it's done at the moment.  In about 9 ours I'll be back at my development machine, I should have some stock code I can post that does something similar to what you are trying.  I do hope however that someone else has the answer on how to set the sql_escape_character to somthing different.

Link to comment
https://forums.phpfreaks.com/topic/200608-str_replace-problem/#findComment-1052733
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.