original_string: public function import_record($table, $dataobject) {
          $dataobject = (object)$dataobject;
  
          $columns = $this->get_columns($table);
          $cleaned = array();
          foreach ($dataobject as $field=>$value) {
              if (!isset($columns[$field])) {
                  continue;
              }
              $cleaned[$field] = $value;
          }
  
          return $this->insert_record_raw($table, $cleaned, false, true, true);
      }
code: public function import_record($table, $dataobject) {
          $dataobject = (object)$dataobject;
  
          $columns = $this->get_columns($table);
          $cleaned = array();
          foreach ($dataobject as $field=>$value) {
              if (!isset($columns[$field])) {
                  continue;
              }
              $cleaned[$field] = $value;
          }
  
          return $this->insert_record_raw($table, $cleaned, false, true, true);
      }
code_tokens: public function import_record ( $ table , $ dataobject ) { $ dataobject = ( object ) $ dataobject ; $ columns = $ this -> get_columns ( $ table ) ; $ cleaned = array ( ) ; foreach ( $ dataobject as $ field => $ value ) { if ( ! isset ( $ columns [ $ field ] ) ) { continue ; } $ cleaned [ $ field ] = $ value ; } return $ this -> insert_record_raw ( $ table , $ cleaned , false , true , true ) ; }
docstring: Import a record into a table, id field is required.
  Basic safety checks only. Lobs are supported.
  @param string $table name of database table to be inserted into
  @param mixed $dataobject object or array with fields in the record
  @return bool success
docstring_tokens: Import a record into a table id field is required . Basic safety checks only . Lobs are supported .