starshade
starshade
Offline
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 = 2 GROUP BY i.id ORDER BY i.id DESC
Responses (2)
  • Accepted Answer

    Thursday, September 11 2014, 09:51 AM - #Permalink
    0
    well if you want we can add the same thing to the quotes page.

    this is that your installation is not permitting "big joins" and the setting SET SQL_BIG_SELECTS=1 must be set in MySQL.
    if you don't know how to enable this at a global level, then we can do it locally like we did with invoices page. do I have access to your website?
    The reply is currently minimized Show
  • Accepted Answer

    starshade
    starshade
    Offline
    Thursday, September 11 2014, 01:35 PM - #Permalink
    0
    deleted
    • Germinal Camps
      more than a month ago
      please, send this privately to support@ joomlathat.com
    The reply is currently minimized Show
Your Reply