Can mysql add qty directly?
| From: | Jan Grafström | Date: | Thu, 28 Feb 2002 07:04:49 +0000 |
| Subject: | Can mysql add qty directly? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-86540@lists.php.net to get a copy of this message | ||
Hi!
I have a product table and want to update the qty.
$insert = "UPDATE products SET soldqty='$sqty' WHERE
articelno='$articleno'";
$result = @mysql_query ($insert);
I want the code to automatically add $sqty to soldqty and not overwrite it
like I do above.
Do I need to first make a separate query on soldqty or is there an easyer
way?
Thanks in advance.
--
Regards,
Jan Grafström
Härnösand
Sweden