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

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

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

want a code for uploading and downloading
i m trying to upload and download to my site..i need upload and download code ...i use a code for up

FAGL_FC_TRANSLATION FAS52 New GL ECC 6.0
Hello,

The new program for Translating GL Balances (FAS 52) gives the option to use diffe

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

newbie error
what is wrong with this code ?

<html>
<body>

<?

php mysql query from input textbox
Hi,

I have a text box, in that i have given the mysql query. I can able to get the query in v

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