View Single Post
  #2  
Old 06-04-2009, 10:06 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Hmmm...

You know you can do "SET bank_money = (bank_money + 5)" in the update statement right?

Your account column should be UNIQUE, and I don't see why you have an id column. 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
)
__________________
Reply With Quote