Building a plugin I'm trying to insert something in my DB but isn't works!
My code is like that:
global $wpdb; $table_name = $wpdb->prefix."mytable"; $wpdb->insert( $table_name, array( 'name'=>"'".$_POST["name"]."'" ), array( '%s' ) );
I have a string in my $_POST["name"] and my database only have 2 columns: id, who is AUTO_INCREMENT and Name.
I don't know if I need do something more than the $wpdb->insert('xxxxxxx') but: Wordpress don't send me any error in PHP or SQL and don't insert anything in my database.