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


PHP Connect::executeQuery方法代碼示例

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


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

示例1: insertToOTD

 function insertToOTD($orderId, $discountId, $discountAmount)
 {
     if (isset($discountId) && $discountId != 0) {
         $insertQuery = "INSERT INTO OrderToDiscounts (orderId,discountId,discountAmount)\n\t\t\t\t\t\t\t\t\t\t\t\t\tVALUES ({$orderId},{$discountId},{$discountAmount})";
         parent::executeQuery($insertQuery);
     }
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:7,代碼來源:OrderToDiscounts.php

示例2: insertToAdmins

 function insertToAdmins($title, $fname, $mname, $lname, $address, $city, $state, $zip, $homeTel, $workTel, $cellTel, $contactPerson, $contactTel)
 {
     $insertQuery = "INSERT INTO Admins (title,fname,mname,lname,address,city,state,zip,homeTel,workTel,cellTel,contactPerson,contactTel,passwd,email)\n\t\t\t\t            VALUES ('{$title}','{$fname}','{$mname}','{$lname}','{$address}','{$city}','{$state}','{$zip}','{$homeTel}','{$workTel}','{$cellTel}','{$contactPerson}','{$contactTel}',MD5('{$this->email}'),'{$this->email}')";
     parent::executeQuery($insertQuery);
     $query = "SELECT LAST_INSERT_ID()";
     $rs = parent::query($query);
     return parent::validateIndexes($rs, 0, 'last_insert_id()');
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:8,代碼來源:Admins.php

示例3: insertToCTP

 function insertToCTP($categId, $prodId)
 {
     if ($this->categId == 0 || $this->prodId == 0) {
         $insertQuery = "INSERT INTO ProdsToCategs\t(categId,prodId)\n\t\t\t\t\t\t\t\t         VALUES\t\t\t({$categId},{$prodId})";
     } else {
         $insertQuery = "INSERT INTO Categories\t(categId,prodId) \n\t\t\t\t\t\t\t\t\t\t VALUES\t\t({$this->categId},{$this->prodId})";
     }
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:9,代碼來源:CategsToProds.php

示例4: insertToOD

 function insertToOD($name, $classification, $methodInitialCost, $methodPercentageCost, $status)
 {
     if ($this->discountId == 0) {
         $insertQuery = "INSERT INTO Discounts (name,classification,,methodInitialCost,methodPercentageCost,status)\n\t\t\t\t\t\t\t\t         VALUES ('{$name}','{$description}','{$methodInitialCost}','{$status}','{$methodPercentageCost}')";
     } else {
         $insertQuery = "INSERT INTO Discounts (name,classification,,methodInitialCost,methodPercentageCost,status,discountId) \n\t\t\t\t\t\t\t\t\t\t VALUES ('{$name}','{$description}','{$methodInitialCost}','{$methodPercentageCost}','{$status}',{$this->discountId})";
     }
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:9,代碼來源:Discounts.php

示例5: insertToOPM

 function insertToOPM($name, $classification, $methodInitialCost, $methodPercentageCost, $status)
 {
     if ($this->paymentMethId == 0) {
         $insertQuery = "INSERT INTO PaymentMethods (name,classification,,methodInitialCost,methodPercentageCost,status)\n\t\t\t\t\t\t\t\t         VALUES ('{$name}','{$classification}','{$methodInitialCost}','{$methodPercentageCost}','{$status}')";
     } else {
         $insertQuery = "INSERT INTO PaymentMethods (name,classification,,methodInitialCost,methodPercentageCost,status,paymentMethId) \n\t\t\t\t\t\t\t\t\t\t VALUES ('{$name}','{$classification}','{$methodInitialCost}','{$methodPercentageCost}','{$status}',{$this->paymentMethId})";
     }
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:9,代碼來源:PaymentMethods.php

示例6: max

 function max()
 {
     $maxQuery = "SELECT  max(orderId) FROM Orders";
     $rs = parent::executeQuery($maxQuery);
     $maxInArray = $rs->fields;
     if (!isset($maxInArray['max(orderId)'])) {
         return 0;
     } else {
         return $maxInArray['max(orderId)'];
     }
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:11,代碼來源:Orders.php

示例7: destroy

 function destroy($sessId)
 {
     //print "destroy";
     $query = "DELETE FROM Sessions WHERE sessId='{$sessId}'";
     if (($result = parent::executeQuery($query)) === false) {
         return false;
     } else {
         setcookie("storez", '', time() - 86400, "/", '', 1);
         return true;
     }
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:11,代碼來源:StoreSessionDB.php

示例8: insertToProducts

 function insertToProducts($categId, $name, $description, $price, $status)
 {
     /*	if (productId == 0)
     				Use Auto_Increment to assign productId field
     			else
     				Assign the value passed in Constructor */
     if ($this->productId == 0) {
         $insertQuery = "INSERT INTO Products (categId,name,description,price,status)\n\t\t\t\t\t\t\t\t\t        VALUES ({$categId},'{$name}','{$description}',{$price},{$status})";
     } else {
         $insertQuery = "INSERT INTO Products (categId,name,description,price,status,productId) \n\t\t\t\t\t\t\t\t\t\t\tVALUES ({$categId},'{$name}','{$description}',{$price},{$status},{$this->productId})";
     }
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:13,代碼來源:Products.php

示例9: insertToCategs

 function insertToCategs($parentId, $name, $description, $position)
 {
     /*	if (categid == 0)
     				Use Auto_Increment to assign categId field
     			else
     				Assign the value passed in Constructor */
     if ($this->categId == 0) {
         $insertQuery = "INSERT INTO Categories (parentId,name,description,position)\n\t\t\t\t\t\t\t\t         VALUES ({$parentId},'{$name}','{$description}',{$position})";
     } else {
         $insertQuery = "INSERT INTO Categories (parentId,name,description,position,categId) \n\t\t\t\t\t\t\t\t\t\t VALUES ({$parentId},'{$name}','{$description}',{$position},{$this->categId})";
     }
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:13,代碼來源:Categories.php

示例10: insertToOTP

 function insertToOTP($orderId, $basket)
 {
     $size = sizeof($basket);
     for ($i = 0; $i < $size; $i++) {
         $productId = $basket[$i][0];
         $productQuantity = $basket[$i][1];
         if ($this->orderId == 0) {
             $insertQuery = "INSERT INTO OrderToProds (orderId,productId,productQuantity)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES ({$orderId},{$productId},{$productQuantity})";
         } else {
             $insertQuery = "INSERT INTO OrderToProds (orderId,productId,productQuantity)\n                                                VALUES ({$this->orderId},{$productId},{$productQuantity})";
         }
         parent::executeQuery($insertQuery);
     }
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:14,代碼來源:OrderToProds.php

示例11: deleteUser

 function deleteUser($uid)
 {
     $query = "SELECT pic FROM Pics WHERE userId='{$uid}'";
     $pics = parent::query($query);
     //print_r($pics);
     foreach ($pics as $outer) {
         foreach ($outer as $pic) {
             $rmOrig = "./images/{$pic}";
             $rmThumb = "./images/thb_{$pic}";
             $rmPop = "./images/pop_{$pic}";
             $out = unlink($rmOrig);
             $out = unlink($rmThumb);
             $out = unlink($rmPop);
         }
     }
     $query = "DELETE from Pics WHERE userId = '{$uid}'";
     parent::executeQuery($query);
     $query = "DELETE from Users WHERE userId = '{$uid}'";
     return parent::executeQuery($query);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:20,代碼來源:Users.php

示例12: insertToOTPM

 function insertToOTPM($orderId, $paymentId, $paymentCost, $paymentAmount)
 {
     $insertQuery = "INSERT INTO OrderToPaymentMeths (orderId,paymentId,paymentCost,paymentAmount)\n\t\t\t\t\t\t\t\t\t\t\tVALUES ({$orderId},{$paymentId},{$paymentCost},{$paymentAmount})";
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:5,代碼來源:OrderToPaymentMeths.php

示例13: insertToStores

 function insertToStores($address, $city, $state, $zip, $telephone)
 {
     $insertQuery = "INSERT INTO Stores (name,address,city,state,zip,telephone)\n\t\t                 VALUES ('{$this->storeName}','{$address}','{$city}','{$state}','{$zip}','{$telephone}')";
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:5,代碼來源:Stores.php

示例14: insertToOTU

 function insertToOTU($orderId, $userId)
 {
     $insertQuery = "INSERT INTO OrderToUser (orderId,userId)\n\t\t\t\t\t\t\t\t\t\tVALUES\t({$orderId},{$userId})";
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:5,代碼來源:OrderToUser.php

示例15: insertToTax

 function insertToTax($storeId, $taxZone, $rate, $description)
 {
     $insertQuery = "INSERT INTO Orders (storeId,taxZone,rate,description) \n\t\t\t\t\t\t\t\t\tVALUES ({$storeId},{$taxZone},{$rate},'{$description}')";
     parent::executeQuery($insertQuery);
 }
開發者ID:nateirwin,項目名稱:custom-historic,代碼行數:5,代碼來源:Tax.php


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