I need to be able to have a charvar field that contains an apostrophe like Woody's. I'm using wp_list_table to simplify the editing of the table. After making the update, the field contains Woody/'s. I can update the data using phpMyAdmin by using Woody''s. Thought that before the data is sent to wp_list_table I could change it to Woody''s, but that ends up in the database as Woody/'/'s. How do I accomplish this?
I need to be able to have a charvar field that contains an apostrophe like Woody's. I'm using wp_list_table to simplify the editing of the table. After making the update, the field contains Woody/'s. I can update the data using phpMyAdmin by using Woody''s. Thought that before the data is sent to wp_list_table I could change it to Woody''s, but that ends up in the database as Woody/'/'s. How do I accomplish this?
Apparently someplace in the wp_list_table, or maybe someplace else, the escape character \ was inserted before any ' . I was able to solve this by adding this line of code just before the $wpdb->update statement.
$item['RecordedSubdivision'] = str_replace("\'", "'",$item['RecordedSubdivision']);