public function insert() { $strBraName = $this->strBraName; $sql = "INSERT INTO brands (BraName ,Discontinued) VALUES " . "('{$strBraName}' , 0)"; $id = DataProvider::execNonQueryIdentity($sql); if ($id != null) { $this->iBraID = $id; } return $id; }
public function insert() { $strProName = $this->strProName; $strProCreated = date('Y-m-d H:i:s', $this->dProCreated); $fPrice = $this->fPrice; $strTinyDes = $this->strTinyDes; $strFullDes = $this->strFullDes; $iInStock = $this->iInStock; $iCatProID = $this->oCatPro->getCatID(); $sql = "INSERT INTO products (ProName, ProCreated , Price, InStock, TinyDes, FullDes , CatProId, Discontinued ) VALUES " . "( '{$strProName}' , '{$strProCreated}' , {$fPrice} , {$iInStock} , '{$strTinyDes}' , '{$strFullDes}' , {$iCatProID} , 0)"; $iProID = DataProvider::execNonQueryIdentity($sql); $this->setProID($iProID); }
public function insert() { $strOrderDate = date_format($this->dOrderDate, 'Y-m-d H:i:s'); $iUserID = $this->oUser->getUserID(); $fTotal = $this->fTotal; $sql = "INSERT INTO orders (OrderDate ,UserID, Total, StatusID ) VALUES " . "('{$strOrderDate}' , {$iUserID}, {$fTotal}, 1 )"; $iOrderID = DataProvider::execNonQueryIdentity($sql); $this->setOrderID($iOrderID); }