Seems like you could do it either way:

PHP
<?
$new_num = $mysql_num + $user_num;
mysql_query("update table set number = $new_num where . . .")
?>

or

MySQL
<?
mysql_query("update table set number = number + $user_num where...")
?>

Depends if you want php or mysql to perform the calculation.

Daniel Venturini wrote:
Hello. Quick easy question I think? I display a INT value to a page (php) by
querying mysql. I want to be able for someone to put a new number and add to
that record. How would I go about doing this. Would this be a mysql command
or a php thing? Thanks in advance.

-- http://mike.kruckenberg.com | [EMAIL PROTECTED]


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to