1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
in:
[select count(*) as total from (zen_orders o, zen_orders_status s ) left join zen_orders_total ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total' ) where (o.orders_status = s.orders_status_id and s.language_id = '1']
here are the three edits I'm trying with original line numbers referenced:
admin/orders.php
line 722
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and ot.class = 'ot_total' order by orders_id DESC";
changed to:
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total' ) " . "
where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' order by orders_id DESC";
line 734
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' " .
changed to:
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total' ) " . "
where o.orders_status = s.orders_status_id and s.language_id
= '" . (int)$_SESSION['languages_id'] . "' and s.orders_status_id = '" . (int)$status . "'" .
line 746
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) " . "
where (o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "' and ot.class = 'ot_total') " .
changed to:
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total' ) " . "
where (o.orders_status = s.orders_status_id and s.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
those are the only changes I've tried, in various combinations. The last change generates the SQL error on page load, but with only the first two edits the error on search remains.
thank you for your time and troubleshooting brains!
---db
Bookmarks