I would consider adding either:
1. a virtual column in the sql to add up the times
2. issue another sql statement to get a total
3. store a total in a cookie / session initially
bastien
From: Allan [EMAIL PROTECTED]
Reply-To: Allan [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB]
Hi,
Apologies if this isn't the right place to ask - but I'm banging my head
against the wall with this one!
I'm trying to update a record in the table (creation script below) using the
following SQL statement:
UPDATE shop_customer SET eu_vat_number = SK1234567890 AND vat_amount = 0
AND
You need to separate the SET arguments with commas, not ANDs...
It's really doing something like this:
UPDATE shop_customer SET eu_vat_number = (SK1234567890 AND vat_amount = 0
AND total_amount = 8.4925) WHERE customer_id = 7 AND hash=dcd5e751
(SK1234567890 AND vat_amount = 0 AND total_amount =
Jenaro,
You're absolutely right (',' instead of 'and' - schoolboy error!). I've
obviously been staring at the screen too long! Strange that MySQL accepted
it as a valid statement though.
Many thanks for the quick reply.
I'm off to have a lie down! :)
Thanks and regards,
Kevin
-Original
Hi,
All you need to do is run a query to your db to get the times.
than use something like this:
?php
// Multiplying with varaibles
$factorA = .01;
$factorB = number_format(system_value('usercount'), 0);
$product = $factorA * $factorB + .25;
echo $product;
?
What