original_string: public function insert($table, $values)
      {
          $colOK = $this->_getColumns($table);
          $query = $this->query('INSERT INTO ' . $table);
          $colQs = array();
          $cols = array();
          if (is_array($values)) {
              foreach ($values as $key => $val) {
                  if (in_array($key, $colOK)) {
                      $cols[] = $key;
                      $colQs[] = $this->query('?', $val);
                  };
              };
          };
          $query->implodeClosed(',', $cols)->append('VALUES')->implodeClosed(',', $colQs);
          return
              $this->_prepare($query->getQuery())->_execute($query->getArgs())
              ? $this->_dbh->lastInsertId()
              : false
          ;
      }
code: public function insert($table, $values)
      {
          $colOK = $this->_getColumns($table);
          $query = $this->query('INSERT INTO ' . $table);
          $colQs = array();
          $cols = array();
          if (is_array($values)) {
              foreach ($values as $key => $val) {
                  if (in_array($key, $colOK)) {
                      $cols[] = $key;
                      $colQs[] = $this->query('?', $val);
                  };
              };
          };
          $query->implodeClosed(',', $cols)->append('VALUES')->implodeClosed(',', $colQs);
          return
              $this->_prepare($query->getQuery())->_execute($query->getArgs())
              ? $this->_dbh->lastInsertId()
              : false
          ;
      }
code_tokens: public function insert ( $ table , $ values ) { $ colOK = $ this -> _getColumns ( $ table ) ; $ query = $ this -> query ( 'INSERT INTO ' . $ table ) ; $ colQs = array ( ) ; $ cols = array ( ) ; if ( is_array ( $ values ) ) { foreach ( $ values as $ key => $ val ) { if ( in_array ( $ key , $ colOK ) ) { $ cols [ ] = $ key ; $ colQs [ ] = $ this -> query ( '?' , $ val ) ; } ; } ; } ; $ query -> implodeClosed ( ',' , $ cols ) -> append ( 'VALUES' ) -> implodeClosed ( ',' , $ colQs ) ; return $ this -> _prepare ( $ query -> getQuery ( ) ) -> _execute ( $ query -> getArgs ( ) ) ? $ this -> _dbh -> lastInsertId ( ) : false ; }
docstring: Execute INSERT statement with variable associative column data
  
  Note that the first time a table is referenced with insert() or
  update(), its list of columns will be fetched from the database to
  create a whitelist.  It is thus safe to pass a form result directly to
  $values.
  
  @param string $table  Name of table to update
  @param array  $values Associative list of columns/values to set
  
  @return mixed New ID if supported/available, false on failure
docstring_tokens: Execute INSERT statement with variable associative column data