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

Need understanding of this bit of code
Code: <?php
// WHERE clause filters
$arrSQLFilters = array();

//

Performance impact of cookies
Hi, I was just wondering what impact there would be in terms of performance if you where to set then

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.
The

need help about
i store the value of my select statement result to an array and stored it to a variable named $fname

Help with some dates
I have a list of dates in an array:

$mondays = array(
strtotime("October 12, 2009

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

All possible combinations of String in PL/SQL
Hi All,

Could you please explain the logic of getting all possible combinations of String

Product categories for registration
Dear all,

We are going live with the Supplier registered next week. At standard, the 'sel

Form always sends to error page...
Hello,
Any help will be greatly appreciated. I am having trouble getting multiple fields to be re

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