• Within my code, i’m trying to update some options at the table wp_options.

    The data is a complex array. But always, the serialized data is truncated at certain chars. For example, this is the last portion of data saved into the table:

    [....]5";}i:33;a:3:{i:0;s:10:"Blend N

    Note that the serialized string, is not terminated. After the ‘N’ there is a ‘o’ (No) char. So, for some reason, this char makes WP to truncate the generated string at this position.

    I’ve tried using the update_option() function, directly with an UPDATE query using $wpdb->query(), tried to clean the string with $wpdb->prepare(), using directly htmlentities() addslashes() ….

    Nothing works. The string is always truncated at this char.

    But, if I simple echo() the serialized array, then copy from the web browser and paste it on navicat, the UPDATE works perfect. o, its not a problem with the db.

    Any idea ???

    Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘UPDATE query gets truncated at certain chars’ is closed to new replies.