$wpdb vs. $post ?
-
I know the data I need is contained in both variables, so I think I should be able to do this with just the $wpdb variable instead of having to use the $post variable.
Is there a better way to do this?
global $wpdb; global $post; $company_name = $post->post_title; $member_data = (array) $wpdb->get_row("SELECT * FROM wp_network_members WHERE company_name = '$company_name'");
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘$wpdb vs. $post ?’ is closed to new replies.