public function insert($table, $records) {
        unset($this->prepare);
        
        $this->sql = sprintf("INSERT INTO `%s` (%s) VALUES (%s);", SafeString::makeSafe($table), $this->fields($records, true), implode(', ', $this->prepare));
        $this->executeQuery(false);
        return $this->numRows() ? true : false;
    }
public function insert($table, $records) {
        unset($this->prepare);
        
        $this->sql = sprintf("INSERT INTO `%s` (%s) VALUES (%s);", SafeString::makeSafe($table), $this->fields($records, true), implode(', ', $this->prepare));
        $this->executeQuery(false);
        return $this->numRows() ? true : false;
    }
public function insert ( $ table , $ records ) { unset ( $ this -> prepare ) ; $ this -> sql = sprintf ( "INSERT INTO `%s` (%s) VALUES (%s);" , SafeString :: makeSafe ( $ table ) , $ this -> fields ( $ records , true ) , implode ( ', ' , $ this -> prepare ) ) ; $ this -> executeQuery ( false ) ; return $ this -> numRows ( ) ? true : false ; }
Inserts into database using the prepared PDO statements
@param string $table This should be the table you wish to insert the values into
@param array $records This should be the field names and values in the format of array('fieldname' => 'value', 'fieldname2' => 'value2', etc.)
@return boolean If data is inserted returns true else returns false
Inserts into database using the prepared PDO statements