当前位置: 首页>>代码示例>>PHP>>正文


PHP DataProvider::Load方法代码示例

本文整理汇总了PHP中DataProvider::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP DataProvider::Load方法的具体用法?PHP DataProvider::Load怎么用?PHP DataProvider::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataProvider的用法示例。


在下文中一共展示了DataProvider::Load方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FromUserName

 public static function FromUserName($userName)
 {
     $o = NULL;
     $sql = "select UserID , UserName, UserPassWord, FullName, Email, DateOfBirth, Gender, UserCreated, UserLastModified, LastLogon  ,UserPermission   from users where UserName = '{$userName}'";
     $resultSet = DataProvider::Load($sql);
     if ($row = $resultSet->fetch_assoc()) {
         $UserID = $row["UserID"];
         $UserName = $row["UserName"];
         $Password = $row["UserPassWord"];
         $FullName = $row["FullName"];
         $Email = $row["Email"];
         $DateOfBirth = new DateTime($row["DateOfBirth"]);
         $Gender = $row["Gender"];
         $UserCreated = new DateTime($row["UserCreated"]);
         $UserLastModified = new DateTime($row["UserLastModified"]);
         $LastLogon = new DateTime($row["LastLogon"]);
         $Permission = $row["UserPermission"];
         $o = new User($UserID, $UserName, $Password, $Email, $FullName, $Gender, $DateOfBirth, $UserCreated, $UserLastModified, $LastLogon, $Permission);
     }
     return $o;
 }
开发者ID:luvyatyss,项目名称:nashop,代码行数:21,代码来源:User.php

示例2: getValueMaxColName

 public static function getValueMaxColName($MaxColName)
 {
     $sql = "select MAX(" . $MaxColName . ") AS Max " . "from products ";
     $resultSet = DataProvider::Load($sql);
     $row = $resultSet->fetch_assoc();
     $max = $row['Max'];
     return $max;
 }
开发者ID:luvyatyss,项目名称:nashop,代码行数:8,代码来源:Product.php

示例3: getOrderDetail

 public static function getOrderDetail($iOrderDetailID)
 {
     $o = null;
     $sql = "select OrderDetailID, OrderID, p.ProID  as ProID, ProName , od.Quantity, od.Price, Amount  from orderdetails od, products p" . " where od.ProID  = p.ProID  and OrderDetailID  = " . $iOrderDetailID;
     $resultSet = DataProvider::Load($sql);
     if ($row = $resultSet->fetch_assoc()) {
         $id = $row["OrderDetailID"];
         $oOrder = new Order($row["OrderID"]);
         $oProduct = new Product($row["ProID"], $row["ProName"]);
         $quantity = $row["Quantity"];
         $price = $row["Price"];
         $amount = $row["Amount"];
         $o = new OrderDetail($id, $oProduct, $oOrder, $price, $quantity, $amount);
     }
     return $o;
 }
开发者ID:luvyatyss,项目名称:nashop,代码行数:16,代码来源:OrderDetail.php

示例4: getStatus

 public static function getStatus($iStatusID)
 {
     $o = null;
     $sql = "select StatusID, StatusName, StatusColor " . "from statuses where  StatusID = " . $iStatusID;
     $resultSet = DataProvider::Load($sql);
     if ($row = $resultSet->fetch_assoc()) {
         $iStatusID = $row["StatusID"];
         $strStatusName = $row["StatusName"];
         $strStatusColor = $row["StatusColor"];
         $o = new Status($iStatusID, $strStatusName, $strStatusColor);
     }
     return $o;
 }
开发者ID:luvyatyss,项目名称:nashop,代码行数:13,代码来源:Status.php

示例5: Load

 function Load()
 {
     $dataProvider = new DataProvider($this->SessionFile);
     $dataProvider->Load();
     $this->IP = $dataProvider->Result["s_ip"];
     $this->SystemInfo = $dataProvider->Result["s_system"];
     $this->Language = $dataProvider->Result["s_language"];
     $this->Resolution = $dataProvider->Result["s_resolution"];
     $this->Host = $dataProvider->Result["s_host"];
     if (isset($dataProvider->Result["s_geotz"])) {
         $this->GeoTimezoneOffset = $dataProvider->Result["s_geotz"];
     }
     if (isset($dataProvider->Result["s_geolong"])) {
         $this->GeoLongitude = $dataProvider->Result["s_geolong"];
     }
     if (isset($dataProvider->Result["s_geolat"])) {
         $this->GeoLatitude = $dataProvider->Result["s_geolat"];
     }
     if (isset($dataProvider->Result["s_geocity"])) {
         $this->GeoCity = $dataProvider->Result["s_geocity"];
     }
     if (isset($dataProvider->Result["s_geocountry"])) {
         $this->GeoCountryISO2 = $dataProvider->Result["s_geocountry"];
     }
     if (isset($dataProvider->Result["s_georegion"])) {
         $this->GeoRegion = $dataProvider->Result["s_georegion"];
     }
     if (isset($dataProvider->Result["s_visits"])) {
         $this->Visits = $dataProvider->Result["s_visits"];
     }
     if (isset($dataProvider->Result["s_georid"])) {
         $this->GeoResultId = $dataProvider->Result["s_georid"];
     }
     if (isset($dataProvider->Result["s_geoisp"])) {
         $this->GeoISP = $dataProvider->Result["s_geoisp"];
     }
 }
开发者ID:afzet,项目名称:cake-cart,代码行数:37,代码来源:objects.global.users.inc.php

示例6: getDevice

 public static function getDevice($iDeviceID)
 {
     $o = null;
     $sql = "select DeviceID, DeviceName  , Discontinued " . "from devices where  DeviceID = " . $iDeviceID;
     $resultSet = DataProvider::Load($sql);
     if ($row = $resultSet->fetch_assoc()) {
         $iDeviceID = $row["DeviceID"];
         $strDeviceName = $row["DeviceName"];
         $status = $row["Discontinued"];
         $o = new Device($iDeviceID, $strDeviceName, $status);
     }
     return $o;
 }
开发者ID:luvyatyss,项目名称:nashop,代码行数:13,代码来源:Device.php

示例7: getCat

 public static function getCat($iCatProID)
 {
     $o = null;
     $sql = "select CatProID, CatName, c.DeviceID as DeviceID, d.DeviceName as DeviceName , c.Discontinued as Discontinued , c.BraID as BraID , b.BraName as BraName  " . "from categories as c , devices as d , brands as b where b.BraID = c.BraID and d.DeviceID = c.DeviceID and CatProID = " . $iCatProID;
     $resultSet = DataProvider::Load($sql);
     if ($row = $resultSet->fetch_assoc()) {
         $iCatProID = $row["CatProID"];
         $strCatName = $row["CatName"];
         $iBraID = $row["BraID"];
         $strBraName = $row["BraName"];
         $oBrand = new Brand($iBraID, $strBraName);
         $iDeviceID = $row["DeviceID"];
         $strDeviceName = $row["DeviceName"];
         $oDevice = new Device($iDeviceID, $strDeviceName);
         $status = $row["Discontinued"];
         $o = new Category($iCatProID, $strCatName, $oBrand, $oDevice, $status);
     }
     return $o;
 }
开发者ID:luvyatyss,项目名称:nashop,代码行数:19,代码来源:Category.php

示例8: getBrand

 public static function getBrand($iBraID)
 {
     $sql = "select BraID, BraName, LogoURL  , Discontinued " . "from brands where  BraID = " . $iBraID;
     $resultSet = DataProvider::Load($sql);
     $o = null;
     if ($row = $resultSet->fetch_assoc()) {
         $iBraID = $row["BraID"];
         $strBraName = $row["BraName"];
         $strLogoURL = $row["LogoURL"];
         $status = $row["Discontinued"];
         $o = new Brand($iBraID, $strBraName, $strLogoURL, $status);
     }
     return $o;
 }
开发者ID:luvyatyss,项目名称:nashop,代码行数:14,代码来源:Brand.php

示例9: Load

 function Load($_chatfile)
 {
     if (isnull($_chatfile)) {
         $dataProvider = new DataProvider($this->TargetFileExternal);
     } else {
         $dataProvider = new DataProvider($_chatfile);
     }
     $dataProvider->Load();
     $this->Id = $dataProvider->Result["s_id"];
     $this->InternalUser = new Operator($dataProvider->Result["s_internal_sessid"], $dataProvider->Result["s_internal_userid"]);
     $this->ExternalUser = new ExternalChat($dataProvider->Result["s_external_userid"], $dataProvider->Result["s_external_browserid"]);
     $this->InternalUser->Fullname = $dataProvider->Result["s_internal_fullname"];
     $this->SetDirectories();
 }
开发者ID:afzet,项目名称:cake-cart,代码行数:14,代码来源:objects.global.inc.php


注:本文中的DataProvider::Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。