The $wpdb->query function allows you to execute any SQL query on the WordPress database. It is best to use a more specific function. Check sample code below for SELECT query.
1
2
3
4
5
6
7
8
|
<?php $wpdb->query('query'); ?>
// Examples
$wpdb->query( "
UPDATE $wpdb->posts
SET post_parent = 7
WHERE ID = 15
AND post_status = 'static' "
);
|
ReplyDeleteThanks for the nice blog. It was very useful to me. I m happy I found this blog. Thank you for sharing with us, I too always learn something new from your post.
wordpress development company
I appreciate your blog really very great.
ReplyDeleteMLM Software Development
This is often at the same time a good present that many of us seriously enjoyed browsing. It's not at all on a daily basis which i provide the likeliness to check something. Smart contract Development solution Gwalior
ReplyDeleteA good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one wordpress site developer
ReplyDeleteI appreciate your blog really very great.gupt rog doctors in allahabad
ReplyDeleteI enjoyed reading your post. very nice share.
ReplyDeletesexologist course in allahabad
We are really grateful for your blog post. Thank you…… sexologist course in allahabad
ReplyDeleteVery helpful and informative information here thank you for sharing. top 10 sexologist doctors in allahabad
ReplyDelete