Advertisement
Bedhoel

model/sertifikat update

May 25th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. function getDataListSertifikat($where,$order,$limit){
  2.           global $db;
  3.           $sql = "SELECT srt.*,us.username from user_sertifikat as srt  inner join user as us on
  4.                     us.id_user=srt.pemegang_sertifikat
  5.                     ".$where."  ".$order.$limit;
  6.           $rs  = $db->Execute($sql);
  7.           if(!$rs) {
  8.             return $db->ErrorMsg();
  9.           }
  10.           else {
  11.             return $rs;
  12.           }
  13.     }
  14.     function getCountListSertifikat($where){
  15.           global $db;
  16.           $sql = "SELECT srt.id_user_sertifikat from user_sertifikat as srt  inner join user as us on
  17.                     us.id_user=srt.pemegang_sertifikat
  18.                     ".$where;
  19.           $rs  = $db->Execute($sql);
  20.           if(!$rs) {
  21.             return $db->ErrorMsg();
  22.           }
  23.           else {
  24.             return $rs->recordCount();
  25.           }
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement