<?php

//===GET===
$sql['get_count'] = "
SELECT
   COUNT(sumberBarangId) AS total
FROM
   sumber_barang_ref
WHERE
   sumberBarangNama LIKE %s
   ";   


$sql['get_data']="
SELECT 
	sumberBarangId AS id,
	sumberBarangNama AS nama
FROM 
	sumber_barang_ref
WHERE
   sumberBarangNama LIKE %s
LIMIT %s, %s
";

$sql['get_data_by_id']="
SELECT
   sumberBarangId AS id,
	sumberBarangNama AS nama
FROM 
	sumber_barang_ref
WHERE
   sumberBarangId = %s
";
   

//===DO===

$sql['do_add'] = 
   "INSERT INTO `sumber_barang_ref` 
    ( `sumberBarangNama`)
   VALUES 
    (%s)";

$sql['do_delete']="
   DELETE FROM `sumber_barang_ref` 
   WHERE
    `sumberBarangId`=%s
";  


$sql['do_update'] = 
   "UPDATE `sumber_barang_ref` SET  
     `sumberBarangNama`=%s
    WHERE 
	  `sumberBarangId`=%s
";

?>
