diff --git a/WordPress/Docs/DB/RestrictedFunctionsStandard.xml b/WordPress/Docs/DB/RestrictedFunctionsStandard.xml new file mode 100644 index 0000000000..c0c01a1ccc --- /dev/null +++ b/WordPress/Docs/DB/RestrictedFunctionsStandard.xml @@ -0,0 +1,53 @@ + + + + + + + + mysqli_query( + $mysql, + "SELECT * FROM wp_posts LIMIT 5" +); + ]]> + + + get_posts(); + ]]> + + + + + mysqli_query( + $mysql, + "INSERT INTO wp_posts (post_title) + VALUES ('Title')" +); + ]]> + + + wp_insert_post( + array( 'post_title' => 'Title' ) +); + +// or... + +global $wpdb; +$wpdb->insert( + "{$wpdb->prefix}_posts", + array( 'post_title' => 'Title' ), + array( '%s' ) +); + ]]> + + +