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

echo buscar();

function buscar() {
	$txtNom=utf8_decode(TRIM($_POST['txtNom']));
	
	# QUERYS
	$sSerieoc = "SELECT TRIM(so_cod) AS so_cod, TRIM(so_nom) AS so_nom FROM serieoc WHERE so_nom LIKE '%$txtNom%'";

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

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