Created
October 1, 2014 22:28
-
-
Save jeffikus/98d9b6e5528d19c7f5f0 to your computer and use it in GitHub Desktop.
WPDB Insert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// table, $data, $format | |
$wpdb->insert( | |
$wpdb->postmeta, | |
array( | |
'post_id' => '5', | |
'meta_key' => '_custom_meta_key', | |
'meta_value' => 'true' | |
), | |
array( | |
'%d', | |
'%s', | |
'%s' | |
) | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment