I'm trying to pull some custom data from a Cart66 table.
My code works whenever I pull results from standard WP table in (my array is populated and the print_r shows that data), but not with any Cart66 tables (it prints an empty array).
I am absolutely certain that I've got data in these tables (I've rechecked that I'm using the correct table names about 1,000,000 times). I've tried two Cart66 tables which have data in them.
The codex says the get_results class should work with any table, not just standard tables. I thought it might be the underscore that was causing trouble, but underscores are supposed to be fine, and indeed, standard WP tables with underscores work fine.
$rawproducts = $wpdb->get_results( "SELECT * FROM $wpdb->cart66_products" );
print_r($rawproducts);
This is maddening! Any ideas?
Thanks!
print_r
of$rawproducts
? Also, just concatenate strings for clarity:'SELECT * FROM '.$wpdb->cart66_products
.