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
Did you know?Explore Trending and Topic pages for more stories like this.

$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

PHP - HTML
Could anyone give me some GOOD sample links for php - html email tutorial.

Thanks!

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_

Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitesp

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

Matchcode in ALV change header column
Hello everyone,

I am working in an SAP system that is currently in upgrade and conversion

Where am I going wrong
Been trying to work this out for hours

I have two tables called 'Genres' and 'Films'. Genre

IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

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