public function insert($table, $params) {
		$params = $this->filter_table_data($table, $params, $this);

		$keys = array_keys($params);
		foreach ($keys as $key => $value) {
			$keys[$key] = $this->quote_identifier($value);
		}

		$query = 'INSERT INTO ' . $this->quote_identifier($table) . ' (' . implode(',', $keys) . ') VALUES (';

		for ($i=0; $i < count($params); $i++) {
			if ($i > 0) {
				$query .= ', ';
			}
			$query .= '?';
		}

		$query .= ') ';
		$statement = $this->get_statement($query, $params);
		$statement->execute();
	}
public function insert($table, $params) {
		$params = $this->filter_table_data($table, $params, $this);

		$keys = array_keys($params);
		foreach ($keys as $key => $value) {
			$keys[$key] = $this->quote_identifier($value);
		}

		$query = 'INSERT INTO ' . $this->quote_identifier($table) . ' (' . implode(',', $keys) . ') VALUES (';

		for ($i=0; $i < count($params); $i++) {
			if ($i > 0) {
				$query .= ', ';
			}
			$query .= '?';
		}

		$query .= ') ';
		$statement = $this->get_statement($query, $params);
		$statement->execute();
	}
public function insert ( $ table , $ params ) { $ params = $ this -> filter_table_data ( $ table , $ params , $ this ) ; $ keys = array_keys ( $ params ) ; foreach ( $ keys as $ key => $ value ) { $ keys [ $ key ] = $ this -> quote_identifier ( $ value ) ; } $ query = 'INSERT INTO ' . $ this -> quote_identifier ( $ table ) . ' (' . implode ( ',' , $ keys ) . ') VALUES (' ; for ( $ i = 0 ; $ i < count ( $ params ) ; $ i ++ ) { if ( $ i > 0 ) { $ query .= ', ' ; } $ query .= '?' ; } $ query .= ') ' ; $ statement = $ this -> get_statement ( $ query , $ params ) ; $ statement -> execute ( ) ; }
Construct and execute an insert query

@access public
@param string $table The table to insert into
@param array $params The values to insert into the table
Construct and execute an insert query