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?

139 Like 24 Dislike
Previous php-forum Next php-forum
Other php-forum

Best way to cross matching large datasets
Hi,

Im running a script where am I cross matching about 200 000 data sets with each other. Ea

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

SHOW TABLES Help
Hi all

I have the following

Code: [Select]<?php
$sql = "SHOW TABLES&quo

order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea

Is there a function ... auto send IP
Is there some function that can be sent to a ddns service that returns the ip address of a ddns forw

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and

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