Basic wpdb query not working; no results
-
global $wpdb; $gallery = $wpdb->get_row("SELECT * FROM $wpdb->wp_ngg_gallery WHERE gid = 3"); echo $gallery->slug;
Why doesn’t this work? Isn’t this the most rudimentary type of wpdb query statement? I should be getting results (checked the table/column names in phpmyadmin). I also checked if $gallery exists after and it comes back negative.
Tried get_var, get_results too–nada.
Huh???
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Basic wpdb query not working; no results’ is closed to new replies.