public function insert($t, $nvp = array()){
		$nvps = $nvp;
		if(is_array($t)){
			$nvps = $t;
		}elseif(is_string($t)){
			$this->table($t);
		}
		if(!isset($nvps[0])){
			$nvps = array($nvps);
		}
		$columns = [];
		foreach($nvps as $i => $nvp){
			$columns[$i] = [];
			foreach(array_keys($nvp) as $s){
				$column = \Dorsataio\Squibble\Resource\Extract::fromColumn($s);
				$column['value'] = $nvp[$s];
				array_push($columns[$i], $column);
			}
		}
		$this->_sql = $this->getInsertStatement($columns);
		return $this;
	}
public function insert($t, $nvp = array()){
		$nvps = $nvp;
		if(is_array($t)){
			$nvps = $t;
		}elseif(is_string($t)){
			$this->table($t);
		}
		if(!isset($nvps[0])){
			$nvps = array($nvps);
		}
		$columns = [];
		foreach($nvps as $i => $nvp){
			$columns[$i] = [];
			foreach(array_keys($nvp) as $s){
				$column = \Dorsataio\Squibble\Resource\Extract::fromColumn($s);
				$column['value'] = $nvp[$s];
				array_push($columns[$i], $column);
			}
		}
		$this->_sql = $this->getInsertStatement($columns);
		return $this;
	}
public function insert ( $ t , $ nvp = array ( ) ) { $ nvps = $ nvp ; if ( is_array ( $ t ) ) { $ nvps = $ t ; } elseif ( is_string ( $ t ) ) { $ this -> table ( $ t ) ; } if ( ! isset ( $ nvps [ 0 ] ) ) { $ nvps = array ( $ nvps ) ; } $ columns = [ ] ; foreach ( $ nvps as $ i => $ nvp ) { $ columns [ $ i ] = [ ] ; foreach ( array_keys ( $ nvp ) as $ s ) { $ column = \ Dorsataio \ Squibble \ Resource \ Extract :: fromColumn ( $ s ) ; $ column [ 'value' ] = $ nvp [ $ s ] ; array_push ( $ columns [ $ i ] , $ column ) ; } } $ this -> _sql = $ this -> getInsertStatement ( $ columns ) ; return $ this ; }
Start a new INSERT query.

@param array $nvp An NVP array containing columns their value to be inserted.

@return object returns the current squibble object.
Start a new INSERT query .