changed in all three places, as advised.
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id =
ot.orders_id and ot.class = 'ot_total' ) " . "
became
PHP Code:
left join " . TABLE_ORDERS_TOTAL . " ot on (op.orders_id =
ot.orders_id and ot.class = 'ot_total' ) " . "
Error on page load:
1054 Unknown column 'op.orders_id' in 'on clause'
in:
[select count(*) as total from (zen_orders o, zen_orders_status s ) left join zen_orders_total ot on (op.orders_id = ot.orders_id and ot.class = 'ot_total' ) where (o.orders_status = s.orders_status_id and s.language_id = '1')]
You create the search_orders_products filter this way:
PHP Code:
$new_table = " left join " . TABLE_ORDERS_PRODUCTS . " op on (op.orders_id = o.orders_id) ";
$keywords = zen_db_input(zen_db_prepare_input($_GET['search_orders_products']));
$search = " and (op.products_model like '%" . $keywords . "%' or op.products_name like '" . $keywords . "%')";
if (substr(strtoupper($_GET['search_orders_products']), 0, 3) == 'ID:') {
$keywords = TRIM(substr($_GET['search_orders_products'], 3));
$search = " and op.products_id ='" . (int)$keywords . "'";
we haven't looked at that code ... ? Disclaimer: I am pretty ignorant about how these queries are structured, and have no idea what's wrong. I just know that code is executing, too.
well, I'm going home, to be continued tomorrow for me! Have a good evening, Dr. Byte!
--diana
Bookmarks