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); }
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); }
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); }
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); }
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; }
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); }
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); }
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); }
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; }
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; }
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; }
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; }
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]; }
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; }
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; }
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; }
public static function countAllBySQL($strSQL) { $result = DataProvider::Query($strSQL); $resultSet = mysql_fetch_array($result); return $resultSet[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]; }
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]; }
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); }