<?php

//===GET===
$sql['get_setting'] = "
	SELECT
		REPLACE(settingNama,'_',' ')as settingNama,
		settingValue
	FROM
		setting
   ";

$sql['get_unit_kerja_by_i'] = "
	SELECT
		unitKerjaId,
		unitKerjaKode,
		unitKerjaNama
	FROM
		unit_kerja_ref
	WHERE
		unitkerjaId = '%s'
";

$sql['get_unit_kerja']="
	SELECT
		unitkerjaId AS id,
		unitkerjaNama AS name
	FROM
		unit_kerja_ref
";

$sql['get_gudang_list']="
   SELECT
      ruangId AS id,
      CONCAT(gedungNama,'  &raquo; ',ruangNama) AS name
   FROM
      ruang
      JOIN gedung ON gedungId = ruangGedungId
   WHERE
      ruangJenisRuangId < 0 [NOT_INCLUDE]
   ORDER BY
      name
";

$sql['get_ruang_list']="
   SELECT
      ruangId AS id,
      CONCAT(gedungNama,'  &raquo; ',ruangNama) AS name
   FROM
      ruang
      JOIN gedung ON gedungId = ruangGedungId
   ORDER BY
      name
";

$sql['update_setting'] = "
	UPDATE setting SET
		settingValue = '%s'
	WHERE
		settingId = '%s'
";
?>
