WordPress in wpdb can easily implement database additions and deletions, WordPress developers must use the class!
Case:
1. Use the Wpdb class to insert a data table (Wp_person) that you have created.
Global $wpdb ; $data=array($_post$_post$_post[' user_name ']); $wpdb->insert ($wpdb->prefix. ' Person ',$data);
$wpdb->prefix represents the prefix "Wp_"
2. Use the Wpdb class query data table (Wp_person) row of information;
<? Global $wpdb ; $denglu=$_post[' denglu_id '];
$wpdb->get_row ("SELECT * from". $wpdb->prefix. " Person ' WHERE denglu_id= $denglu ')
foreach ($rowas$a
$a
?>
Query all information of the table;
$wpdb->get_results ("select * from"). $wpdb->prefix. " Person ' WHERE denglu_id=$denglu')
3. Update the database table (Wp_person) information using the Wpdb class;
<? Global $wpdb ; $title= "123456"; $denglu= "8888"; $wpdb $wpdb Array (' title ' = =$titlearray(' denglu_id ' =$denglu));? >
Board Deng: WordPress in the Wpdb Class database additions and deletions to change the operation