I'm currently using three separate queries to get the data I need out of this table. I know there is a way to do a single query... I just can't seem to figure out what that way is... Anyone?
Code:SELECT COUNT(tracking_number) as dase FROM billing WHERE user_id = $user_id AND charge_description_code = 'LDR' AND invoice_date BETWEEN '$start_date' AND '$end_date' SELECT COUNT(tracking_number) as total FROM billing WHERE user_id = $user_id AND package_quantity>0 AND invoice_date BETWEEN '$start_date' AND '$end_date' SELECT COUNT(tracking_number) as das FROM billing WHERE user_id = $user_id AND charge_description_code = 'RDR' AND invoice_date BETWEEN '$start_date' AND '$end_date'









Bookmarks