Jump to content

Returning integers from a MySQL DataBase


Wildhalf

Recommended Posts

Rather than draw it from the database and add 1 to it and then put it back, just update it like this:

[code]mysql_query("UPDATE TABLE SET REFERRALS=REFERRALS+1 WHERE SOMETHING='something'");[/code]

You can do this as long as you have set the field type to an integer value of some sort.
Tandem,

Thank you for such a quick reply. It works like a charm...

Been looking on the web for 40 mins and new there would be an easy way to do it..

One step closer to completion. When im finished ill PM my site to you for a look...

Thanks again,

Kieron

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.