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


PHP MySQL::QuerySingleRow方法代碼示例

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


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

示例1: getLayeredFilter

 function getLayeredFilter()
 {
     $sql = "SELECT filters FROM ps_layered_filter WHERE name = 'VisionFilter'";
     $db = new MySQL();
     return $db->QuerySingleRow($sql);
 }
開發者ID:addomine,項目名稱:Vision-eCommerce,代碼行數:6,代碼來源:PSFeature.php

示例2: getProductBasePrice

 function getProductBasePrice($id_product)
 {
     $sql = "SELECT * FROM ps_product WHERE id_product = {$id_product}";
     $db = new MySQL();
     $result = $db->QuerySingleRow($sql);
     if ($db->RowCount() > 0) {
         return $result->price;
     } else {
         return -1;
     }
 }
開發者ID:addomine,項目名稱:Vision-eCommerce,代碼行數:11,代碼來源:PSListini.php

示例3: getIDManufacturer

 /**
  * Metodo utilizzato per recuperare id del produttore a partire dal nome
  * 
  * @param String $produttore Nome del produttore
  * @return Int Id del produttore presente nel db
  */
 function getIDManufacturer($produttore)
 {
     $sql = "SELECT id_manufacturer FROM ps_manufacturer WHERE name = '{$produttore}'";
     $db = new MySQL();
     $result = $db->QuerySingleRow($sql);
     return $result->id_manufacturer;
 }
開發者ID:addomine,項目名稱:Vision-eCommerce,代碼行數:13,代碼來源:PSProduct.php

示例4: getIdProductFromCode

 function getIdProductFromCode($code)
 {
     if (isset($this->_MAPPING_PRODOTTI_CODE_ID[$code])) {
         return $this->_MAPPING_PRODOTTI_CODE_ID[$code];
     } else {
         return null;
     }
     $db = new MySQL();
     $sql = "SELECT id_product FROM ps_product WHERE code = '{$code}'";
     $result = $db->QuerySingleRow($sql);
     return $result->id_product;
 }
開發者ID:addomine,項目名稱:Vision-eCommerce,代碼行數:12,代碼來源:PSObject.php

示例5: getIdUserFromCode

 function getIdUserFromCode($code)
 {
     $db = new MySQL();
     $sql = "SELECT id_customer FROM ps_customer WHERE code = '{$code}'";
     $result = $db->QuerySingleRow($sql);
     return $result->id_customer;
 }
開發者ID:addomine,項目名稱:Vision-eCommerce,代碼行數:7,代碼來源:PSCustomer.php

示例6: getCategoryShopLastPosition

 /**
  * Metodo utilizzato per recuperare ultimo valore di position all'interno della tabella ps_category_shop
  * 
  * @return int $position Ultimo valore di position presente
  */
 function getCategoryShopLastPosition()
 {
     $db = new MySQL();
     $sql = "SELECT position FROM ps_category_shop WHERE id_category > 2 ORDER BY position DESC";
     $result = $db->QuerySingleRow($sql);
     if ($db->RowCount() > 0) {
         return $result->position + 1;
     } else {
         return 1;
     }
 }
開發者ID:addomine,項目名稱:Vision-eCommerce,代碼行數:16,代碼來源:PSCategory.php

示例7: getStateFromId

 /**
  * Metodo per recuperare la stringa ISO_CODE della provincia del customer Prestashop
  *
  * @param int $id_state Identificativo della provincia associata al customer
  * @return ISO_CODE Sigla della provincia del customer PRestashop
  *
  */
 function getStateFromId($id_state)
 {
     $query = "SELECT * FROM ps_state WHERE id_state = {$id_state}";
     $db = new MySQL();
     $result = $db->QuerySingleRow($query);
     return $result->iso_code;
 }
開發者ID:addomine,項目名稱:Vision-eCommerce,代碼行數:14,代碼來源:ps2erp.php


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