Oh, ignore me, I'm such an idiot sometimes. I ran the query on the DB of the live site, and the script on the DB of the test server, which actually didn't have any matching results. $wpdb is fine. WordPress rocks!