$wpdb insert problem – not inserting string
-
I am trying to insert a new record into a table, and for the most part it’s working except for one string. Here’s my insert statement;
$wpdb->insert($wpdb->uam_accessgroup_to_object, array('object_id' => $userID, 'object_type' => 'user', 'group_id' => $entry['7']), array('%s', '%d'));
It’s creating a new record and inserting the correct values into ‘object_id’ and ‘group_id’, however ‘object_type’ which should be ‘user’ is saved in the db as ‘0’. The field type is varchar(255).
Is there something wrong with my insert statement?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘$wpdb insert problem – not inserting string’ is closed to new replies.