Quote:
Originally Posted by The)TideHunter(
Hey, i've never really used sql before, i've tried but to no avail.
What im asking for is a query that will add a new section to the table (preferablly called "coins") and 2 functions which are Get and Set for the coins.
So for example, every member has a coins section (just like posts) and 2 functions like:
function Get takes userid returns coinsamount
function Set takes userid, coinsamount.
I'm really having trouble doing this, any help appreiciated.
|
You need to add the coins field to the table
[sql]alter table tablename add column coins int(11);[/sql]
getter
[sql]select coins from tablename where userid=something[/sql]
setter
[sql]update tablename set coins=something where userid=somethingelse[/sql]