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

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a

Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

Login script (probably a simple error)
dbConfig.php
Code: <?
// Replace the variable values below
// with your specific dat

Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a var

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

Unable to customise toolbar in FCK

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