Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Web Developer Interviews:BootstrapFront End Web DeveloperHTML DeveloperHybrid Application DeveloperInternee PHP DeveloperJnr PHP/Codeigniter DeveloperJunior Developer PHPLaravel PHP DeveloperPython DeveloperRuby DeveloperTypographyWeb Developer & DesignerWeb Developer Cum SEO AnalystWeb Development NinjasWebsite DeveloperWordPress Themes Developer
Copyright © 2018. All Rights Reserved
WordPress Themes Developer Interview Question:
Explain me how to run database Query in WordPress?
Submitted by: MuhammadThe $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.
<?php $wpdb->query('query'); ?>// Examples
$wpdb->query( "
UPDATE $wpdb->posts
SET post_parent = 7
WHERE ID = 15
AND post_status = 'static' "
);
Submitted by: Muhammad
<?php $wpdb->query('query'); ?>// Examples
$wpdb->query( "
UPDATE $wpdb->posts
SET post_parent = 7
WHERE ID = 15
AND post_status = 'static' "
);
Submitted by: Muhammad
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.