Jump to content

Way to insert +7 into a field?


Guest

Recommended Posts

Hi, I have a field called experience in mysql and I want to add +7 to said field, is it possible using UPDATE or insert? If so, what's the syntax?

 

Here's what I have that doesn't work, it sets experience to 7, but won't add another 7 when clicked again.

 

 if(isset($_POST['submit'])){
    $query = "UPDATE account_info SET experience = +7 WHERE username = $name"; 
    $result = mysql_query($query) or die(mysql_error());
}

 

 

don't ask for the whole script, because you won't need it to answer that o.0

Link to comment
https://forums.phpfreaks.com/topic/220775-way-to-insert-7-into-a-field/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.