<?php
$sql['get_count'] = "
   SELECT
      count(gdgFasilitasId) AS total
   FROM
      gedung_fasilitas_ref
   WHERE
      gdgFasilitasNama like '%s'
";

$sql['get_data'] = "
   SELECT
      gdgFasilitasId AS fasilitas_id,
      gdgFasilitasNama AS fasilitas_nama,
      gdgFasilitasKet AS fasilitas_keterangan
   FROM
      gedung_fasilitas_ref
   WHERE  
      gdgFasilitasNama like '%s'  
   ORDER BY gdgFasilitasNama
   LIMIT %s,%s
";

$sql['get_data_by_id'] = "
   SELECT
      gdgFasilitasId AS fasilitas_id,
      gdgFasilitasNama AS fasilitas_nama,
      gdgFasilitasKet AS fasilitas_keterangan
   FROM
      gedung_fasilitas_ref
   WHERE
      gdgFasilitasId = '%s'
";

$sql['do_add'] = "
   INSERT INTO 
      gedung_fasilitas_ref 
      (gdgFasilitasNama, gdgFasilitasKet)
   VALUES 
      ('%s', '%s')
";

$sql['do_delete'] = "
   DELETE FROM 
      gedung_fasilitas_ref
   WHERE
      gdgFasilitasId = '%s'
";  

$sql['do_update'] = "
   UPDATE 
      gedung_fasilitas_ref
   SET
      gdgFasilitasNama = '%s',
      gdgFasilitasKet = '%s'
    WHERE 
      gdgFasilitasId = '%s'
";
?>