0
1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay SQL=SELECT i.*, u.name as username, co.name as contact_name, co.user_id as joomla_user_id, SUM(DISTINCT pa.payment_amount) AS total_paid, SUM(DISTINCT pa2.payment_amount) AS total_unpaid, SUM(DISTINCT pa3.payment_amount) AS total_unpaid_ontime, COUNT(DISTINCT pa.id) AS paid_payments, COUNT(DISTINCT pa2.id) AS unpaid_payments, COUNT(DISTINCT pa3.id) AS unpaid_payments_ontime FROM aqu5o_invoices_invoices as i LEFT JOIN aqu5o_invoices_contacts as co ON co.id = i.user_id LEFT JOIN aqu5o_invoices_payments as pa ON (pa.invoice_id = i.id AND pa.payment_status = 1) LEFT JOIN aqu5o_invoices_payments as pa2 ON (pa2.invoice_id = i.id AND pa2.payment_status = 0) LEFT JOIN aqu5o_invoices_payments as pa3 ON (pa3.invoice_id = i.id AND pa3.payment_status = 0 AND (pa3.payment_duedate > NOW() OR pa3.payment_duedate = "0000-00-00 00:00:00")) LEFT JOIN aqu5o_users as u ON u.id = co.user_id WHERE i.type = 1 GROUP BY i.id ORDER BY i.id DESC
I have many orders entered into the invoice program and I cannot access it. Help me..
I have many orders entered into the invoice program and I cannot access it. Help me..
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »