<?php
include('../../../php/sessionStart.php');
include('../../../php/db/dbExec.php');
include('../../../php/functions.php');

echo buscar();

function buscar() {
	$txtNom=utf8_decode(TRIM($_POST['txtNom']));
	$empCod=$_SESSION['empCod'];

	# QUERYS
	$sBancos = "SELECT *, TRIM(ban_nom) AS ban_nom
				FROM bancos WHERE ban_nom LIKE '%$txtNom%' AND ban_emp='$empCod'";

	# EJECUCION DE QUERYS
	$db = new dbExec();
	$resp["bancos"] = $db->sFetchAll($sBancos);
	$db->close();

	$func = new functions();
	return $func->jsonEncodeArray($resp, "bancos");
}
?>