1global $wpdb;
2$wpdb->get_results("
3 SELECT * FROM " . $wpdb->prefix . "product_order
4 WHERE
5 rel = '" . $post["id"] . "' AND
6 `range` = '" . $range . "' AND
7 category = '" . $range . "'
8 ");
9
10echo $wpdb->num_rows;
11