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

admin with my register system?
Hey i wana make it so i can make a admin level on my register system , I'm kinda new to php to im no

Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two va

isset undefined variable
Hi all,

Hope someone can point out the obvious. I've a log in script, if you dont enter a use

problems with script
I made a small script wich exchanges points in my website:


<?php
session_start

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

Locking mysql tables with php
Hi

BACKGROUND:
I have multiple instances of the same php script running in a WAMP environ

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

xml
<?php

echo "<h1>XML Articles</h1>";

$home

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