<?php

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


$sql['get_data']="
SELECT
   satuanbrgId AS id,
   satuanbrgNama AS nama
FROM
   satuan_barang_ref

WHERE
   satuanbrgNama LIKE %s
LIMIT %s, %s

";

$sql['get_data_by_id']="
SELECT
   satuanbrgId AS id,
   satuanbrgNama AS nama
FROM
   satuan_barang_ref
WHERE
   satuanbrgId = %s
LIMIT 1
";
   

//===DO===

$sql['do_add'] = 
   "INSERT INTO `satuan_barang_ref` 
    ( `satuanbrgId`, `satuanbrgNama`)
   VALUES 
    (  '',  %s)";

$sql['do_delete']="
   DELETE FROM `satuan_barang_ref` 
   WHERE
    `satuanbrgId`=%s
";  


$sql['do_update'] = 
   "UPDATE `satuan_barang_ref` SET  
     `satuanbrgNama`=%s
    WHERE 
	  `satuanbrgId`=%s
";

?>
