<?php


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


$sql['get_data']="
SELECT
   kondisibrgId AS id,
   kondisibrgNama AS nama
FROM
   kondisi_barang_ref
WHERE
   kondisibrgNama LIKE %s
ORDER BY
   kondisibrgId
LIMIT %s, %s

";

$sql['get_data_by_id']="
SELECT
   kondisibrgNama AS nama
FROM
   kondisi_barang_ref
WHERE
   kondisibrgId = %s
";

// DO-----------
$sql['do_add'] = "
   INSERT INTO 
      kondisi_barang_ref 
      (kondisibrgId, kondisibrgNama)
   VALUES 
      ('', '%s')
";

$sql['do_delete'] = "
   DELETE FROM 
      kondisi_barang_ref
   WHERE
      kondisibrgId = %d
";  

$sql['do_update'] = "
   UPDATE 
      kondisi_barang_ref
   SET
      kondisibrgNama = '%s'
    WHERE 
      kondisibrgId = %d
";
?>
