<?php
$sql['get_count'] = "
   SELECT
      count(tipeRuangId) AS total
   FROM
      tipe_ruang_ref
   WHERE
      tipeRuangNama like '%s'
";

$sql['get_data'] = "
   SELECT
      tipeRuangId AS tipe_ruang_id,
      tipeRuangNama AS tipe_ruang_nama
   FROM
      tipe_ruang_ref
   WHERE  
      tipeRuangNama like '%s'  
   ORDER BY tipeRuangNama
   LIMIT %s,%s
";

$sql['get_data_by_id'] = "
   SELECT
      tipeRuangId AS tipe_ruang_id,
      tipeRuangNama AS tipe_ruang_nama
   FROM
      tipe_ruang_ref
   WHERE
      tipeRuangId = '%s'
";

$sql['do_add'] = "
   INSERT INTO 
      tipe_ruang_ref 
      (tipeRuangId, tipeRuangNama)
   VALUES 
      ('', '%s')
";

$sql['do_delete'] = "
   DELETE FROM 
      tipe_ruang_ref
   WHERE
      tipeRuangId = '%s'
";  

$sql['do_update'] = "
   UPDATE 
      tipe_ruang_ref
   SET
      tipeRuangNama = '%s'
    WHERE 
      tipeRuangId = '%s'
";
?>