Last active
September 5, 2016 05:11
-
-
Save nmedia82/cf3de011fb3f19a062985d007efb3166 to your computer and use it in GitHub Desktop.
Wordpress secure way query into Database
This file contains hidden or 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
// assumng col is a int value | |
$wpdb->query( $wpdb->prepare ("INSERT into table_name (col1, col2, col3) VALUES (%d, %s, %s)", | |
array('$value1','$value2', '$value3') | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment