<?php
$sql['get_count'] = "
   SELECT
      count(fasilitasId) AS total
   FROM
      fasilitas_ref
   WHERE
      fasilitasNama like '%s'
";

$sql['get_data'] = "
   SELECT
      fasilitasId AS fasilitas_id,
      fasilitasNama AS fasilitas_nama
   FROM
      fasilitas_ref
   WHERE  
      fasilitasNama like '%s'  
   ORDER BY fasilitasNama
   LIMIT %s,%s
";

$sql['get_data_by_id'] = "
   SELECT
      fasilitasId AS fasilitas_id,
      fasilitasNama AS fasilitas_nama
   FROM
      fasilitas_ref
   WHERE
      fasilitasId = '%s'
";

$sql['do_add'] = "
   INSERT INTO 
      fasilitas_ref 
      (fasilitasId, fasilitasNama)
   VALUES 
      ('', '%s')
";

$sql['do_delete'] = "
   DELETE FROM 
      fasilitas_ref
   WHERE
      fasilitasId = '%s'
";  

$sql['do_update'] = "
   UPDATE 
      fasilitas_ref
   SET
      fasilitasNama = '%s'
    WHERE 
      fasilitasId = '%s'
";
?>