Adding to an Int row in db


Posted on 16th Feb 2014 07:03 pm by admin

Hi, i have a database which houses all of the users of my site. One of the columns is for points which is default 0.
What I would like to do is add 1 to this number each time they upload an image. What code would i use for this? I have an idea but i dont think it would work. My idea is something like:

$add= +1

$sql ("update users set points=$add")

Something like that?

No comments posted yet

Your Answer:

Login to answer
139 Like 24 Dislike
Previous forums Next forums
Other forums

Pspell with my own dictionary
Hello!
I've tested two cases using pspell functions.
1)
Code: $dictionary_link = pspell_new

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Posting to another Site?
I have software that people install.
When they install it, is there a way to make it post their d

Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related codi

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!

My son

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

Help Ordering Arrays
Hi, I have 3 arrays as shown below.

Code: $users = $this->get_latest_users();
$flir

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash