0
Hello there,
since today I get this msg if I want add a new invoice ... so whats going wrong? I never had the problem before:
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 qjs6g_invoices_invoices as i LEFT JOIN qjs6g_invoices_contacts as co ON co.id = i.user_id LEFT JOIN qjs6g_invoices_payments as pa ON (pa.invoice_id = i.id AND pa.payment_status = 1) LEFT JOIN qjs6g_invoices_payments as pa2 ON (pa2.invoice_id = i.id AND pa2.payment_status = 0) LEFT JOIN qjs6g_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 qjs6g_users as u ON u.id = co.user_id WHERE i.type = 1 GROUP BY i.id ORDER BY i.id DESC
THanks
Carsten
since today I get this msg if I want add a new invoice ... so whats going wrong? I never had the problem before:
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 qjs6g_invoices_invoices as i LEFT JOIN qjs6g_invoices_contacts as co ON co.id = i.user_id LEFT JOIN qjs6g_invoices_payments as pa ON (pa.invoice_id = i.id AND pa.payment_status = 1) LEFT JOIN qjs6g_invoices_payments as pa2 ON (pa2.invoice_id = i.id AND pa2.payment_status = 0) LEFT JOIN qjs6g_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 qjs6g_users as u ON u.id = co.user_id WHERE i.type = 1 GROUP BY i.id ORDER BY i.id DESC
THanks
Carsten
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 »