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

Can I use a loop
Hi buddies!

Once again with my doubts here.

Right now I am using this sql stat

Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for eve

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai

why isn't this PHP code working ???
it's suppose to find a name on the database.

<?php

$s = $_POST["lname&

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

IIS on 2003 anon access disabled issue
I have an IIS server that belongs to a domain, and anonymous access is turned off for all my sites.

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