當前位置: 首頁>>代碼示例>>PHP>>正文


PHP customer::setCC方法代碼示例

本文整理匯總了PHP中customer::setCC方法的典型用法代碼示例。如果您正苦於以下問題:PHP customer::setCC方法的具體用法?PHP customer::setCC怎麽用?PHP customer::setCC使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在customer的用法示例。


在下文中一共展示了customer::setCC方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: extractClientMail

 function extractClientMail()
 {
     $stmt = $this->pdo->prepare("SELECT k.id,k.firma,k.email,k.land, kd.nummer,kdp.einzelpreis,kdp.menge FROM kontakte as k, kontakte_dokumente as kd, kontakte_dokumente_positionen as kdp WHERE k.land like '%%' and kdp.dokument_id = kd.id and kd.kontakte_id = k.id and kdp.dokument_id IN (SELECT kd.id FROM kontakte_dokumente as kd WHERE kd.typ = 7) ORDER BY k.land");
     try {
         $stmt->execute();
     } catch (Exception $e) {
         echo $e->getLine() . " : " . $e->getMessage();
     }
     $lineOrders = $stmt->fetchAll(PDO::FETCH_ASSOC);
     $this->orders = array();
     foreach ($lineOrders as $lineOrder) {
         $tag = $this->getIndex($lineOrder["nummer"]);
         if ($tag !== false) {
             $new_product = new product('', $lineOrder["einzelpreis"], $lineOrder["menge"]);
             $this->orders[$tag]->addProduct($new_product);
         } else {
             $new_order = new order($lineOrder['nummer'], '', $lineOrder['firma'], $lineOrder['id']);
             $new_order->setCC($lineOrder['land']);
             $new_order->setMail($lineOrder['email']);
             $new_product = new product('', $lineOrder["einzelpreis"], $lineOrder["menge"]);
             $new_order->addProduct($new_product);
             array_push($this->orders, $new_order);
         }
         $this->updatePrice();
     }
     $this->clients = array();
     foreach ($this->orders as $order) {
         if ($order->getCC() != 0 && $order->getCC() != NULL) {
             $tag = $this->getIndexofClient($order->getCustomer_name(), $this->clients);
             if ($tag !== false) {
                 $this->clients[$tag]->addOrder($order);
             } else {
                 $new_customer = new customer($order->getCustomer_name());
                 $new_customer->addOrder($order);
                 $new_customer->setId($order->getCustomer_id());
                 $new_customer->setCC($order->getCC());
                 $new_customer->setMail($order->getMail());
                 array_push($this->clients, $new_customer);
             }
         }
     }
     foreach ($this->clients as $client) {
         $client->calcAmount();
     }
     return $this->clients;
 }
開發者ID:JulienRst,項目名稱:Biothys-Manager,代碼行數:46,代碼來源:extraction.php


注:本文中的customer::setCC方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。