insert data in database table from plugin with WP3.1

You can check database function for database here. For the table prefix matter you should use $wpdb->prefix . 'enam' and it will return the table prefix. Just add the table name with this. So the total code would be :

$yourtablename =  $wpdb->prefix . 'enam';

so your total code could be something like:

$wpdb->insert($yourtablename , array('username' => "enam" ,
                             'useremail' => "[email protected]"));

EDIT:
If you need more information you can see THIS article. This is very useful article for creating plugin with database.

Leave a Comment