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

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/

I've got the base down you can uplo

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

Does design fit in FPGA ?
Hi all,

I've made a large HCC-Design. Because of the program-size the compile process with th

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not g

mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")

How to create a static html menu from a database
Hi,

I have built a small cms which allows me to create simple html pages and then upload them

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