[Resolved] help with $WPDB object
I have been reading in the codex about the $wpdb object at:
On this page , they give the following example of a query:
<?php $querystr = " SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'tag' AND wpostmeta.meta_value = 'email' AND wposts.post_status = 'publish' AND wposts.post_type = 'post' ORDER BY wposts.post_date DESC "; $pageposts = $wpdb->get_results($querystr, OBJECT); ?>
I must apologize but my understanding of SQL is limited. In the 3rd line ( FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta ) does ‘FROM $wpdb->posts wposts’ mean “select from the table ‘posts’ and put the recordset into the ‘wposts’ object” ?
I don’t understand what wposts is.
Thank you in advance,
- The topic ‘[Resolved] help with $WPDB object’ is closed to new replies.