Hi all, just a quick question, I’m tearing my hair out here! My servers time is incorrect and so therefore need to correct it by eight hours. Instead of going through every query, etc I thought it might be better to create a variable and just use that variable - making things much easier in the future should I need to change servers, etc. However the query is failing when I use the variable, any idea what is wrong? Any help is appreciated as always
$mysql_now = 'date_add(now(), INTERVAL 8 HOUR';
$application = mysql_query(sprintf("
INSERT INTO application_order
(customers_id, customers_name, customers_address, customers_telephone, customers_email, hire_start, hire_end, arrival_date, return_date,
coupon_code, last_modified, date_purchased, order_status, order_total,
order_discount, order_master_total, delivery_cost,
order_tax_rate, order_tax, ip_address)
VALUES('%f', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', $mysql_now, $mysql_now, '%f', '%f', '%f', '%f', '%f', '%s', '%f', '%s')", $_SESSION['USERS_ID'], $_SESSION['USERS_FULL_NAME'], $_SESSION['USERS_ADDRESS'], $_SESSION['USERS_TELEPHONE'],$_SESSION['USERS_EMAIL'], $_SESSION['DATES']['hire_start'], $_SESSION['DATES']['hire_end'], $_SESSION['DATES']['arrival_date'],$_SESSION['DATES']['return_date'], $_SESSION['COUPON_CODE'], '0',
$this->grand_total(1), $this->grand_total(1)-$this->grand_total(),
$this->grand_total(), $this->delivery_price($_SESSION['DELIVERY']),
$this->vatRate, $this->grand_total()-$this->vatRemove($this->grand_total()), $_SERVER['REMOTE_ADDR']
));