locate inside the class file this function: function get_order($customer)
and add and "echo" before this row:
$sql_new = sprintf("INSERT INTO %s (customer, order_date) VALUES (%d, NOW())", ORDERS, $customer);
test this query in phpmyadmin too
locate inside the class file this function: function get_order($customer)
and add and "echo" before this row:
$sql_new = sprintf("INSERT INTO %s (customer, order_date) VALUES (%d, NOW())", ORDERS, $customer);
test this query in phpmyadmin too
I think I have the reason of these problems:
it is this SQL command:
DELETE FROM db_cart_orders WHERE open = 'y' AND order_date < (NOW() - 715112448) AND customer = 0 )
every time I check the page 2 this script is run and delete the orders,
which are opened too. I think something is wrong with the date.
if I comment this SQL command it seems to work correctly.
what do you think about it ?
do you hard coded the time value?
what do you use in the db_config file?
default is:
define("VALID_UNTIL", 7 * 86400); // 7 days
you value is about today-8276 days
try the default value again
I have the default value :
define("VALID_UNTIL", 7 * 86400);
But in the SQL there is * 86400 again. is this correct ?
sprintf("DELETE FROM %s WHERE open = 'y' AND order_date < (NOW() - %d)", ORDERS, VALID_UNTIL * 86400);
sorry can't follow you... what you have posted before is wrong (post 389)
You must log in to post.