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

Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

Remove Rows From Database ad
Hi All,

I have this:

Code: [Select]<?php
session_start();
include('../com

Users and Groups with PHP Classes
Hi,

I have setup what I hope to be a good working User class. Now I want to introduce group m

Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following O

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

Get content from table into a list, without repeating.
Alright this is kinda an odd thing, so I need some help.

I have a table "quote" wit

db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

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