Mysql querys help
-
Hi,
I’m trying to do a simple sum query based on category but what ever i try does not work.
“
$wpdb->wpfb_files = $wpdb->prefix . ‘wpfb_files’;$total_hits = $wpdb->get_var( “SELECT SUM(file_hits) FROM $wpdb->wpfb_files WHERE file_category = 2″ );”
It didn’t even work without the Where.
How would you go about doing this?
thanks,
Kennyist.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Mysql querys help’ is closed to new replies.