<?php

//===GET===
$sql['get_count'] = "
SELECT
   COUNT(jenisruangId) AS total
FROM
   jenis_ruang_ref
WHERE
   jenisruangNama LIKE %s
LIMIT 1
   ";   


$sql['get_data']="
SELECT
   jenisruangId AS id,
   jenisruangKode AS kode,
   jenisruangNama AS nama
FROM
   jenis_ruang_ref

WHERE
   jenisruangNama LIKE %s
LIMIT %s, %s

";

$sql['get_data_by_id']="
SELECT
   jenisruangId AS id,
   jenisruangKode AS kode,
   jenisruangNama AS nama
FROM
   jenis_ruang_ref
WHERE
   jenisruangId = %s
LIMIT 1
";
   

//===DO===

$sql['do_add'] = 
   "INSERT INTO `jenis_ruang_ref` 
    ( `jenisruangId`, `jenisruangKode` , `jenisruangNama`)
   VALUES 
    (  '',  %s , %s)";

$sql['do_delete']="
   DELETE FROM `jenis_ruang_ref` 
   WHERE
    `jenisruangId`=%s
";  


$sql['do_update'] = 
   "UPDATE `jenis_ruang_ref` SET  
     `jenisruangKode` = %s,
     `jenisruangNama`=%s
    WHERE 
	  `jenisruangId`=%s
";

?>
