I'd like to select sum of three columns from three tables in mysql and then get it as php array.
Tables:
Amex:
incr_id,check_no, card_no, tip, total, date;
Mc:
incr_id,check_no, card_no, tip, total, date;
Visa
incr_id,check_no, card_no, tip, total,date ;
Pseudo code :
$query =
select sum(tip) from Amex,
select sum(tip) from Mc,
select sum(tip) from Visa
WHERE DATE(date) = CURDATE()
mysql_fetch_array($query);
and then 'foreach' or 'while' to get three values into php array:
$ccpayments_tip['Amex']
$ccpayments_tip['Mc']
$ccpayments_tip['Visa']
Is this possible or I will have to execute three select queries? Thanks!