Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql add to value

<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("my_db", $con);

mysql_query("UPDATE `some_table` SET `value` = `value` + 1000 WHERE `id` = 1");

mysql_close($con);
?> 
 
PREVIOUS NEXT
Tagged: #mysql #add
ADD COMMENT
Topic
Name
4+2 =