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

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

A rank users order by points
I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.ran

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

storing video files into mysql in php
hi

i have my video files in my folder ,
i have to store the path of the videos into db an

How to add an image/C++ OpenGL?
Hi,

I have been trying to look online for this and, so far, I haven't found anything usef

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

Help with search.php
Hello All

I need the search engine on a site I am building at the moment to display the searc

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