if($id_categoria = filtroID($_GET['cat'])){
$resultado = mysqli_query($link,"SELECT * from productos where ocultar!='1' and categoria='$id_categoria' and id!='$id' order by posicion_oferta asc, titulo asc");
//CONSULTAR NOMBRE DE LA CATEGORIA
$sql_categoria = mysqli_query($link,"SELECT * from productos_categorias where id='$id_categoria'");
$registro_categoria = mysqli_fetch_assoc($sql_categoria);
$nombre_categoria = $registro_categoria['titulo'];
}elseif($id = filtroID($_GET['id'])){
$resultado = mysqli_query($link,"SELECT * from productos where ocultar!='1' and id!='$id' and categoria='$categoria' or ocultar!='1' and categoria!='$categoria' order by posicion_oferta asc, titulo asc");
}elseif($buscar = filtroBuscar($_GET['buscar'])){
$resultado = mysqli_query($link,"SELECT * from productos where ocultar!='1' and titulo like '%$buscar%' or presentacion like '%$buscar%' order by id desc");
}elseif($servicio_buscar = filtroID($_GET['servicio_buscar']) and $pais_buscar = $_GET['pais_buscar']){
$resultado = mysqli_query($link,"SELECT * from productos where ocultar!='1' and categoria='$servicio_buscar' and dato12 like '%$pais_buscar%' order by id desc");
//CONSULTAR NOMBRE DE LA CATEGORIA
$sql_categoria = mysqli_query($link,"SELECT * from productos_categorias where id='$servicio_buscar'");
$registro_categoria = mysqli_fetch_assoc($sql_categoria);
$nombre_categoria = $registro_categoria['titulo'];
}elseif($pais_buscar = $_GET['pais_buscar']){
$resultado = mysqli_query($link,"SELECT * from productos where ocultar!='1' and dato12 like '%$pais_buscar%' order by id desc");
}elseif($servicio_buscar = filtroID($_GET['servicio_buscar'])){
$resultado = mysqli_query($link,"SELECT * from productos where ocultar!='1' and categoria='$servicio_buscar' order by id desc");
//CONSULTAR NOMBRE DE LA CATEGORIA
$sql_categoria = mysqli_query($link,"SELECT * from productos_categorias where id='$servicio_buscar'");
$registro_categoria = mysqli_fetch_assoc($sql_categoria);
$nombre_categoria = $registro_categoria['titulo'];
}else{
$resultado = mysqli_query($link,"SELECT * from productos where ocultar!='1' order by posicion_oferta asc, titulo asc limit 6");
}
?>
Fatal error: Uncaught Error: Call to a member function free() on null in /home/agenci23/public_html/agenciaportalpro.cl/productos/mostrar/mostrar-productos-items.php:174
Stack trace:
#0 /home/agenci23/public_html/agenciaportalpro.cl/destinos/categorias/index.php(23): include()
#1 {main}
thrown in /home/agenci23/public_html/agenciaportalpro.cl/productos/mostrar/mostrar-productos-items.php on line 174