<?php
$sql['get_count'] = "
   SELECT
      count(picId) AS total
   FROM
      pic_ref
   WHERE
      picNama like '%s'
";

$sql['get_data'] = "
   SELECT
      picId AS id,
      picNama AS nama,
      picNip AS nip
   FROM
      pic_ref
   WHERE  
      picNama like '%s'  
   ORDER BY picNama
   LIMIT %d, %d
";

$sql['get_data_by_id'] = "
   SELECT
      picId AS id,
      picNama AS nama,
      picNip AS nip
   FROM
      pic_ref
   WHERE
      picId = %d
";

$sql['add_pic'] = "
   INSERT INTO 
      pic_ref 
      (picId, picNama, picNip)
   VALUES 
      ('', '%s', '%s')
";

$sql['delete_pic'] = "
   DELETE FROM 
      pic_ref
   WHERE
      picId = %d
";  

$sql['update_pic'] = "
   UPDATE 
      pic_ref
   SET
      picNama = '%s',
      picNip = '%s'
    WHERE 
      picId = %d
";
?>