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

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

Grouping and sorting results
Please help with this query.

I have 2 tables in a database, countires and cities. states look

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time som

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the Fr

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Hyperlink is adding an extra gap to variable
Hi, here's my problem..

I have a php generated page with a hyperlink which opens in a new win

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

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