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

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

Will this protect from mysql injection?
I do not want anything like DROP TABLE to work or any type of coding..

Heres my code.. is it

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Insert numbers from Barcode scanner into online php page
I have a real big problem, Here is what I'm trying to do. I have a Intermec CN3 handheld computer th

IS Retail & Manufacturing
Hi

Can IS Retail and Manufacturing activities be done in same instance ie. in same client

Is it possible to stop reservation creation in PM Order?
Hi All,

Is it possible to stop reservation creation in PM Order?

Thanks in adv

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