<?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
	$sSerieop = "SELECT TRIM(sop_cod) AS sop_cod, TRIM(sop_nom) AS sop_nom FROM serieoprod WHERE sop_nom LIKE '%$txtNom%'";

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

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