Framework/Application/QueryBuilder.php
/**
	 * Inserts data to table
	 * 
	 * @param  string $table table name
	 * @param  array $data  array with binds and values
	 * @return void
	 */
Inserts data to table

@param  string $table table name
@param  array $data  array with binds and values
@return void
Inserts data to table @param string $table table name @param array $data array with binds and values @return void
public function insertIntoTable($data)
	{
		foreach ($data as $insert) {
			$fields = array_keys($insert);
			$values = array_values($insert);
			$dbFields = $this->makeDbFields($fields);
			$binds = $this->makeBindsFromFields($fields);
			$table = $this->model->getTableName();
			$sth = $this->db->prepare("INSERT INTO $table ($dbFields) VALUES ( $binds )");
			$sth->execute($this->makeExecuteArr($binds, $values));
		}
	}
public function insertIntoTable ( $ data ) { foreach ( $ data as $ insert ) { $ fields = array_keys ( $ insert ) ; $ values = array_values ( $ insert ) ; $ dbFields = $ this -> makeDbFields ( $ fields ) ; $ binds = $ this -> makeBindsFromFields ( $ fields ) ; $ table = $ this -> model -> getTableName ( ) ; $ sth = $ this -> db -> prepare ( " INSERT INTO  $ table  ( $ dbFields ) VALUES (  $ binds  ) " ) ; $ sth -> execute ( $ this -> makeExecuteArr ( $ binds , $ values ) ) ; } }
Inserts data to table
Inserts data to table