Ejemplo n.º 1
0
 public static function getTinhById($id)
 {
     $strSQL = "select *\r\n\t\t\t\t\tfrom tinh where id={$id}";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_row($result, MYSQL_BOTH);
 }
Ejemplo n.º 2
0
 public static function GetAdvByID($id)
 {
     $strSQL = "\tselect * from quangcao\r\n\t\t\t\t\t\twhere id='{$id}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_array($result, MYSQL_BOTH);
 }
Ejemplo n.º 3
0
 public static function GetTTNDByID($id)
 {
     $strSQL = "select * \r\n\t\t\t\t\t   from loaidichvu\r\n\t\t\t\t\t   where id='{$id}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_array($result);
 }
Ejemplo n.º 4
0
 public static function GetAll()
 {
     $strSQL = "\tselect * \r\n\t\t\t\t\t\tfrom user_role \t\t\t\t\r\n\t\t\t\t\t\t";
     $result = DataProvider::Query($strSQL);
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
 public static function selectId($id)
 {
     $strSQL = "select * from donvidichvu where id='{$id}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_row($result, MYSQL_BOTH);
 }
Ejemplo n.º 6
0
 public static function GetPhapLyById($id)
 {
     $strSQL = "select *\r\n\t\t\t\t\tfrom tinhtrangphaply where id='{$id}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_array($result);
 }
 public static function getALL()
 {
     $strSQL = "select * from loaidichvu";
     $result = DataProvider::Query($strSQL);
     while ($row = mysql_fetch_row($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
Ejemplo n.º 8
0
 public static function GetHuongNhaById($id)
 {
     $strSQL = "select *\r\n\t\t\t\t\tfrom huongnha where id='{$id}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_array($result);
 }
Ejemplo n.º 9
0
 public static function delete($id)
 {
     $strSQL = "delete from thuchi where id={$id}";
     $result = DataProvider::Query($strSQL);
     if (mysql_affected_rows() == 0) {
         return null;
     }
     return mysql_fetch_row($result, MYSQL_BOTH);
 }
Ejemplo n.º 10
0
 public static function GetAllTienIchId($id)
 {
     $strSQL = "select *\r\n\t\t\t\t\t   from tienich where id='{$id}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_array($result);
 }
Ejemplo n.º 11
0
 public static function selectID($id)
 {
     $strSQL = "select * from gioithieu where id='{$id}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     $row = mysql_fetch_row($result, MYSQL_BOTH);
     return $row;
 }
 public static function getAllBySQL($strSQL)
 {
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_row($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
Ejemplo n.º 13
0
 public static function GetLevelByNhanVien()
 {
     $strSQL = "select * \r\n\t\t\t\t\t   from level\r\n\t\t\t\t\t   where idlevel<3";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
Ejemplo n.º 14
0
 public static function getAllHinhAnhByDichVuID($iddichvu)
 {
     $strSQL = "Select * from hinhanh where iddichvu={$iddichvu}";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
Ejemplo n.º 15
0
 public static function GetTinVipById($id)
 {
     $strSQL = "select * from dichvuvip\r\n\t\t\t\t\t   where iddichvu='{$id}' and status=0";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
Ejemplo n.º 16
0
 public static function GetCommentByID($id)
 {
     $strSQL = "select * \r\n                            from comment\r\n                            where ID='{$id}' ";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return[0];
 }
Ejemplo n.º 17
0
 public static function GetAllTinDang()
 {
     $strSQL = "\tselect * from dichvu\r\n\t\t\t\t\t\twhere status!=-1\r\n\t\t\t\t\t\torder by ngaydang desc";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
Ejemplo n.º 18
0
 public static function GetAllDonViTien()
 {
     $strSQL = "select * from donvitien";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_row($result, MYSQL_BOTH)) {
         $temp[] = $row;
     }
     return $temp;
 }
Ejemplo n.º 19
0
 public static function GetAllRole()
 {
     $strSQL = "select * \r\n\t\t\t\t\t   from role\r\n\t\t\t\t\t   where id>1";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
 public static function GetImageOfProductFromProductID($product_id)
 {
     $strSQL = "select * \r\n                            from product_image\r\n                            where product_id='{$product_id}' ";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return[0];
 }
 public function Get($offset, $count)
 {
     $strSQL = "select * from promotion order by  Apply_Date_Start DESC limit {$offset}, {$count}";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
 }
 public static function getAllByIDDichVu($idDichVu)
 {
     $strSQL = "Select * from dichvu_tienich where idcanho='{$idDichVu}'";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
         $return[] = $row;
     }
     return $return;
     DataProvider::Close($cn);
     return $result;
 }
Ejemplo n.º 23
0
 public static function countAllBySQL($strSQL)
 {
     $result = DataProvider::Query($strSQL);
     $resultSet = mysql_fetch_array($result);
     return $resultSet[0];
 }
Ejemplo n.º 24
0
 public static function countStatusType($status, $user)
 {
     $strSQL = "select count(*) from dichvu where status='{$status}' and \tchusohuu='{$user}'";
     $result = DataProvider::Query($strSQL);
     $resultSet = mysql_fetch_array($result);
     return $resultSet[0];
 }
Ejemplo n.º 25
0
 public static function Count()
 {
     $strSQL = "select count(*) from cart where Delete_Flag='0' ";
     $result = DataProvider::Query($strSQL);
     $temp = mysql_fetch_array($result);
     return $temp[0];
 }
Ejemplo n.º 26
0
 public static function countByUserLevel($level)
 {
     $strSQL = "select count(*) from khenthuong,user where khenthuong.iduser=user.id and user.level={$level}";
     $result = DataProvider::Query($strSQL);
     if (mysql_num_rows($result) == 0) {
         return null;
     }
     return mysql_fetch_row($result, MYSQL_BOTH);
 }