this code works for me :-)
this code works for me :-)
I get the problem as Nuin - an error based around table selection. This appears on the order success page:
1146 Table 'xxxxxxx.orders' doesn't exist
in:
[SELECT count( orders_id ) AS zilla FROM orders WHERE customers_id = '189']
xxxxx is the proper name of the full database. The code isn't selecting the orders table within that database.
Does anyone know the correct code to do that?
It has to be in this part I guess:
$cn_items = "SELECT count( orders_id ) AS zitems FROM orders_products WHERE orders_id = '" . $zilla_oid ."'";
$cn_items_result = $db->Execute($cn_items);
$zitems = $cn_items_result->fields['zitems'];
Any help appreciated.
Hey all,
@nuin & @peterdd
Do you guys have a table prefix on your zen-cart installation?
@nuin try:
PHP Code:SELECT count( zen_orders_id ) AS zilla FROM zen_orders WHERE customers_id = '1'
@peterdd: do you also have table pre-fixes? - i can't see any in your example but i suspect that you may have?
Andy.