View Single Post
  #3  
Old 06-04-2009, 07:13 PM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Quote:
Originally Posted by Inverness View Post
You know you can do "SET bank_money = (bank_money + 5)" in the update statement right?
Yes, but there is no reason to do that in this script because it would just make the script longer.

Quote:
Originally Posted by Inverness View Post
Your account column should be UNIQUE, and I don't see why you have an id column.
I don't really know why I put it in either, it was never used in the script.

Quote:
Originally Posted by Inverness View Post
You also should not have bank_ in the column names, it's redundant.

CREATE TABLE IF NOT EXISTS bank (
account TEXT UNIQUE NOT NULL,
money INT NOT NULL DEFAULT 0
)
Yes, I think I'll change that actually.
Reply With Quote