• Resolved carlla

    (@carlla)


    I am trying to insert data in a plugin table, but everytime I try to insert a special character the field value stop on the first one. In other words, if I try insert the value “jo?o”, it is inserted as “jo”.

    I am using $wpdb->query($my_query). When I print $my_query I can see the correct value and if i paste it in phpmyadmin it work perfectly.

    any suggest ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You probably need to encode the character or change the collation of your database. See if this helps, then Google for “mysql insert special character”. There is a lot of material out there.

    Thread Starter carlla

    (@carlla)

    hm.. it helps a lot =] thank you…

    I tried to insert with a mysql_query php function and didn’t get this problem. I was wondering if wpdb->query gives a special treatment in my query before run it.

    I’d like do not record the data as htmlentities, because a flash application will get it after. Would be a little hard to treat it in action script.

    I will try your suggestion. Thank you very much =]

    I’ve not done much with Flash but if Flash doesn’t support many entities, and it doesn’t (I looked it up), will it choke on data coming from a database that has been collated to the charset that you need? Just a thought. I really have no idea what the answer is.

    Thread Starter carlla

    (@carlla)

    Just change my php editor’s settings to save files in utf-8 (it is weird, I know). It seems work fine after I saved the php file again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘can’t insert special character’ is closed to new replies.