View Single Post
  #6  
Old 03-11-2010, 10:14 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Cubical View Post
How would I create a table to begin with? I see requestsql and req, is there a sendsql() or inputsql()
The last parameter is whether or not to expect a response, so you would do

PHP Code:
requestsql("CREATE TABLE bank (account TEXT UNIQUE NOT NULL DEFAULT '', money INT NOT NULL DEFAULT 0)"false); 
or, if using a wrapper like the one specified earlier

PHP Code:
req("CREATE TABLE bank (account TEXT UNIQUE NOT NULL DEFAULT '', money INT NOT NULL DEFAULT 0)"false); 
You might also want to look for examples in the code gallery, such as this one by Switch.
__________________
Reply With Quote