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


PHP DataProvider::Open方法代碼示例

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


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

示例1: Delete

 public static function Delete($id)
 {
     $strSQL = "delete from dichvu_tienich where id='{$id}'";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:DichVu_TienIchDAO.php

示例2: Delete

 public static function Delete($id)
 {
     $strSQL = "update cart set Delete_Flag=1 where ID='{$id}' ";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:realolliebee,項目名稱:closes-shop,代碼行數:13,代碼來源:CartController.php

示例3: update

 public static function update($id, $loai, $khenthuong, $ngay)
 {
     $strSQL = "update khenthuong set loai={$loai},thuong='{$khenthuong}', ngay='{$ngay}' where id={$id}";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:KhenThuongDAO.php

示例4: SetStatus

 public static function SetStatus($user_id, $status)
 {
     $strSQL = "update khanangban set status= '{$status}' where user_id={$user_id}";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:KhaNangBanDAO.php

示例5: setStatusTinDang

 public static function setStatusTinDang($aid, $status)
 {
     $strSQL = "\tupdate dichvu set status={$status}\r\n\t\t\t\t\t\twhere id={$aid}";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:TinDangDAO.php

示例6: Update

 public static function Update($id, $hoten, $sdt, $email, $diachi, $noidung, $ngayguitin, $status)
 {
     $strSQL = "update lienhe set hoten='{$hoten}', sdt='{$sdt}',email='{$email}',diachi='{$diachi}',noidung='{$noidung}',ngayguitin='{$ngayguitin}',\r\n\t\t\t\t\t\tstatus= '{$status}' where id={$id}";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:LienHeDAO.php

示例7: add

 public static function add($sotien, $donvi, $congviec, $ngay, $nhanvien, $loai)
 {
     $strSQL = "Insert into thuchi values (NULL,{$sotien},{$donvi},'{$congviec}','{$ngay}',{$nhanvien},{$loai})";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = mysql_insert_id();
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:ThuChiDAO.php

示例8: SetStatusTinVIP

 public static function SetStatusTinVIP($iddv, $value)
 {
     $strSQL = "\tupdate dichvuvip set status={$value}\r\n\t\t\t\t\t\twhere iddichvu={$iddv}";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:DichVuVIPDAO.php

示例9: Delete

 public static function Delete($ID)
 {
     $strSQL = "update product_image set Delete_Flag=1\r\n                      where ID={$ID}";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:realolliebee,項目名稱:closes-shop,代碼行數:13,代碼來源:ProductImageController.php

示例10: Update

 public static function Update($id, $chusohuu, $sdt, $email, $diachi, $sothang, $filename, $link)
 {
     $strSQL = "";
     if ($filename != null) {
         $strSQL = "\tupdate quangcao set chusohuu='{$chusohuu}', sdt='{$sdt}', email='{$email}', diachi='{$diachi}',\r\n\t\t\t\t\t\t\tsothang={$sothang}, hinhanh='{$filename}', link='{$link}'\r\n\t\t\t\t\t\t\twhere id={$id}";
     } else {
         $strSQL = "\tupdate quangcao set chusohuu='{$chusohuu}', sdt='{$sdt}', email='{$email}', diachi='{$diachi}',\r\n\t\t\t\t\t\t\tsothang={$sothang}, link='{$link}'\r\n\t\t\t\t\t\t\twhere id={$id}";
     }
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:18,代碼來源:QuangCaoDAO.php

示例11: SetPassword

 public static function SetPassword($id, $password)
 {
     $password = md5($password);
     $strSQL = "update user set Password='{$password}' where ID='{$id}' ";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:realolliebee,項目名稱:closes-shop,代碼行數:14,代碼來源:UserController.php

示例12: delete

 public static function delete($id)
 {
     $strSQL = "update dichvu set status=-1 where id={$id}";
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:13,代碼來源:DichVuDAO.php

示例13: Update2

 public static function Update2($id, $hoten, $gioitinh, $diachi, $sdt1, $sdt2, $newpass, $ngaycapnhat)
 {
     $strSQL = "";
     if ($newpass != -1) {
         $strSQL = "\tupdate user set hoten='{$hoten}', gioitinh={$gioitinh}, diachi='{$diachi}',\r\n\t\t\t\t\t\t\t\tsdt1='{$sdt1}', sdt2='{$sdt2}', password='{$newpass}', ngaycapnhat='{$ngaycapnhat}' \r\n\t\t\t\t\t\t\twhere id={$id}";
     } else {
         $strSQL = "\tupdate user set hoten='{$hoten}', gioitinh={$gioitinh}, diachi='{$diachi}',\r\n\t\t\t\t\t\t\t\tsdt1='{$sdt1}', sdt2='{$sdt2}', ngaycapnhat='{$ngaycapnhat}' \r\n\t\t\t\t\t\t\twhere id={$id}";
     }
     $cn = DataProvider::Open();
     DataProvider::MoreQuery($strSQL, $cn);
     if (mysql_affected_rows() == 0) {
         $result = false;
     } else {
         $result = true;
     }
     DataProvider::Close($cn);
     return $result;
 }
開發者ID:edconan93,項目名稱:real-estate-website,代碼行數:18,代碼來源:UsersDAO.php


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