<?php
	$sql['check_id_lab'] ="
		SELECT
		  labRuId
		FROM e_laboratorium
		WHERE labRuId = '%s'
	";
	
	$sql['combobox_program_studi'] ="
		SELECT
		  prodiKode      AS id,
		  prodiNamaResmi AS `name`
		FROM program_studi
		ORDER BY prodiNamaResmi
	";
	
	$sql['get_id_gedung'] ="
		SELECT
		  gdProdiKode AS id
		FROM e_gedung
		WHERE gdId = '%s'
	";
	
	$sql['add_e_gedung'] ="
		INSERT INTO e_gedung
            (gdId,
             gdKode,
             gdNama)
		VALUES ('%s',
				  '%s',
				  '%s')
	";
	
	$sql['update_e_gedung'] ="
		UPDATE e_gedung
		SET gdKode = '%s',
		  gdNama = '%s'
		WHERE gdId = '%s'
	";
	
	#$sql['add_e_ruang'] ="
	#	INSERT INTO e_ruang
	#	SET ruId = '%s'/*ruangId*/,
	#	  ruKode = '%s'/*ruangKode*/,/*ruNomor,*/ 
	#	  ruNama = '%s'/*ruangNama*/,
	#	  ruGdId = '%s'/*ruangGedungId*/,
	#	  ruKapasitas = '%s'/*ruangKapasitas*/,/*ruKapasitasUjian,*/ 
	#	  ruGrurId = '%s'/*ruangJenisRuangId*/,
	#	  ruIsKuliah = '%s'/*ruangTipeRuangId*/,
	#	  ruIsLayakPakai = '%s'/*ruangKondidiBarangId*/,
	#	  ruLuas = '%s';/*ruangLuasRuang*//*ruTelp,*//*ruFasilitas *//*ruangFasilitas*//*ruCatatan*/
   #";
	
	$sql['add_e_ruang'] ="
		INSERT INTO e_ruang
		SET ruId = '%s',
		  ruKode = '%s',
		  ruNama = '%s',
		  ruGdId = '%s',
		  ruKapasitas = '%s',
		  ruGrurId = '%s',
		  ruIsKuliah = '%s',
		  ruIsLayakPakai = '%s',
		  ruLuas = '%s';
   ";
	
	$sql['update_e_ruang'] ="
		UPDATE e_ruang
		SET ruKode = '%s',
		  ruNama = '%s',
		  ruKapasitas = '%s',
		  ruGrurId = '%s',
		  ruIsKuliah = '%s',
		  ruIsLayakPakai = '%s',
		  ruLuas = '%s'
		WHERE ruId = '%s'
   ";
	
	$sql['add_e_laboratorium'] ="
		INSERT INTO e_laboratorium
		(
			labRuId
		)
		VALUES 
		(
			'%s'
		)
   ";
	
	$sql['delete_e_laboratorium'] ="
		DELETE FROM e_laboratorium WHERE labRuId = %s
   ";
	
	$sql['delete_e_ruang'] = "
   DELETE FROM
      e_ruang
   WHERE
      ruId = %s
	";
	
	$sql['delete_e_gedung'] = "
   DELETE FROM
      e_gedung
   WHERE
      gdId = %s
	";
?>
