I have the following queries that, if possible, I need to simplify. I'd like to knock this down to as few queries as possible as I will need to call additional (probably 2 other items) from the same row.
I am just looking to get the number of rows matching each set, though I'd rather knock 4 queries down to 1-2 if there is another way to do so.
PHP Code:
$getpending = $db->query_read("SELECT * FROM son_customers WHERE ispending = '1'");
$totalpending = $db->num_rows($getpending);
$getactive = $db->query_read("SELECT * FROM son_customers WHERE ispending = '0'");
$totalactive = $db->num_rows($getactive);
Is there an alternative, of will I be stuck making 4 seperate calls?