original_string: function GenID($seqname = 'adodbseq', $start = 1)
          {
                  $go = $this->Execute("select * from $seqname");
                  if (!$go){
                          $res = $this->Execute("CREATE TABLE $seqname ( ID autoinc( 1 ) ) IN DATABASE");
                          if(!res){
                                  print $this->ErrorMsg();
                                  return false;
                          }
                  }
                  $res = $this->Execute("INSERT INTO $seqname VALUES( DEFAULT )");
                  if(!$res){
                          print $this->ErrorMsg();
                          return false;
                  }
                  else{
                          $gen = $this->Execute("SELECT LastAutoInc( STATEMENT ) FROM system.iota");
                          $ret = $gen->fields[0];
                          return $ret;
                  }
  
          }
code: function GenID($seqname = 'adodbseq', $start = 1)
          {
                  $go = $this->Execute("select * from $seqname");
                  if (!$go){
                          $res = $this->Execute("CREATE TABLE $seqname ( ID autoinc( 1 ) ) IN DATABASE");
                          if(!res){
                                  print $this->ErrorMsg();
                                  return false;
                          }
                  }
                  $res = $this->Execute("INSERT INTO $seqname VALUES( DEFAULT )");
                  if(!$res){
                          print $this->ErrorMsg();
                          return false;
                  }
                  else{
                          $gen = $this->Execute("SELECT LastAutoInc( STATEMENT ) FROM system.iota");
                          $ret = $gen->fields[0];
                          return $ret;
                  }
  
          }
code_tokens: function GenID ( $ seqname = 'adodbseq' , $ start = 1 ) { $ go = $ this -> Execute ( "select * from $seqname" ) ; if ( ! $ go ) { $ res = $ this -> Execute ( "CREATE TABLE $seqname ( ID autoinc( 1 ) ) IN DATABASE" ) ; if ( ! res ) { print $ this -> ErrorMsg ( ) ; return false ; } } $ res = $ this -> Execute ( "INSERT INTO $seqname VALUES( DEFAULT )" ) ; if ( ! $ res ) { print $ this -> ErrorMsg ( ) ; return false ; } else { $ gen = $ this -> Execute ( "SELECT LastAutoInc( STATEMENT ) FROM system.iota" ) ; $ ret = $ gen -> fields [ 0 ] ; return $ ret ; } }
docstring: and gets the ID number of the last inserted record.
docstring_tokens: and gets the ID number of the last inserted record .