PsyOps

MakeTable

Jan 25th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1.             //open connection
  2.             if (this.OpenConnection(q) == true)
  3.             {
  4.                 string query = "CREATE TABLE bz_bank ( player_id int(10) unsigned not null primary key auto_increment, player_name varchar(100) not null, bz_bux int(10) unsigned );";
  5.                 //create command and assign the query and connection from the constructor
  6.                 MySqlCommand cmd = new MySqlCommand(query, connection);
  7.  
  8.                 //Execute command
  9.                 cmd.ExecuteNonQuery();
  10.  
  11.                 //close connection
  12.                 this.CloseConnection(q);
  13.                 q.Enqueue(msg.arena("Tables saved.~"));
  14.             }
Advertisement
Add Comment
Please, Sign In to add comment