<?php

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


$sql['get_data']="
SELECT
   jnsbidusahaId AS id,
   jnsbidusahaNama AS nama
FROM
   jenis_bidang_usaha_ref

WHERE
   jnsbidusahaNama LIKE %s
LIMIT %s, %s

";

$sql['get_data_by_id']="
SELECT
   jnsbidusahaId AS id,
   jnsbidusahaNama AS nama
FROM
   jenis_bidang_usaha_ref
WHERE
   jnsbidusahaId = %s
LIMIT 1
";
   

//===DO===

$sql['do_add'] = 
   "INSERT INTO `jenis_bidang_usaha_ref` 
    ( `jnsbidusahaId`, `jnsbidusahaNama`)
   VALUES 
    (  '',  %s)";

$sql['do_delete']="
   DELETE FROM `jenis_bidang_usaha_ref` 
   WHERE
    `jnsbidusahaId`=%s
";  


$sql['do_update'] = 
   "UPDATE `jenis_bidang_usaha_ref` SET  
     `jnsbidusahaNama`=%s
    WHERE 
	  `jnsbidusahaId`=%s
";

?>
