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

Retreiving objects from Sessions
Hi all,

I am getting really frustrated with storing and retreiving objects from a session. Bu

Php navigation
I have four buttons on a php page.
If i click a button it will redirect to different php pages.

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Php mysql - select?
Hi i have this code:
Code: $iteminfo = mysql_query("SELECT desc FROM wc_items WHERE itemid =

Why will this program not run if the variables are not global?
Hey guys I have a kind of perplexing situation that is probably simple, but I can't seem to understa

WHYISNT THIS MYSQL STATEMNT NOT WORKING? (php)
caps because its absolutely rediculous.
i dontunderstand why its not working. there is a column c

reating a background image
I am building a site in drupal and have a php form in it, due to certain annoyances with module buil

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

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