View Single Post
  #12  
Old 03-11-2010, 01:40 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
It's being created as is, I fixed what you were just talking about and still nothing.
PHP Code:

function onActionServerside(options){
temp.tokens options.tokenize();
  switch (
temp.tokens[0]){
    case 
":create":
      
temp.statement "CREATE TABLE " temp.tokens[1] @ " (account TEXT NOT NULL DEFAULT 'guest',nickname TEXT NOT NULL DEFAULT 'unknown',currenttime DEFAULT '0')";
      
req(temp.statementfalse);
      echo(
"CREATED TABLE: " temp.tokens[1]);
      break;
    case 
":insert":
      
temp.statement "INSERT INTO "temp.tokens[1] @" VALUES('"@player.account@"','"@player.nick@"',"@timevar2@")";
      
req(temp.statementfalse);
      echo(
"INSERTED: " player.account SPC player.nick SPC timevar2 " INTO " temp.tokens[1]);
      break;
    case 
":select":
      
temp.statement "SELECT * FROM " temp.tokens[1];
      
temp.req(temp.statementfalse);
      echo(
temp.i.rows[0]);
      break;
    case 
":update":
      
temp.statement "";
      
requestsql(temp.statementfalse);
      break;
    case 
":delete":
      
temp.statement "";
      
requestsql(temp.statementfalse);
      break;
  }
}
function 
req(queryexpect) {
  
temp.req requestsql(queryexpect);
  
  if (
expect) {
    
waitFor(req"onReceiveData"60);
  }
  
  if (
req.error != null) {
    echo(
"SQL Error: " req.error);
    echo(
"  Query: " query);
  }
  
  return 
req;
}  
//#CLIENTSIDE
function onPlayerChats(){
triggerserver("gui",name,player.chat);

when i try to select it returns the value 0

Edit: Wil Soul is wrong......
Reply With Quote