Ver Mensaje Individual
  #8 (permalink)  
Antiguo 31/03/2009, 14:58
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Que esta mal POO

Tu consulta es incorrecta:
Código php:
Ver original
  1. $consulta = $MOD['mysql']->consulta("SELECT * FROM noticias WHERE categoria='$categoria'");

Tenias un "." de mas.

Luego en este archivo:
Código php:
Ver original
  1. break;
  2.         case 'listado_noticia':
  3.         default:
  4.             var_dump($_POST['categoria']);
  5.             $categoria = $_POST['categoria'];
  6.             $items_noticia1 = $MOD['noticias']->elegirNoticia($categoria);// con esta quiero que me muestre las notcias pero con la categoria que eleji
  7.            
  8.             $items_noticia1 = $MOD['noticias']->getNoticias();// con esta linea me muestra todas las noticias de manera general
  9.             //if(!empty($_SESSION['usuario_id'])&&($_SESSION['usuario_nivel']==3)){
  10.                 include('modulos/noticias3/vistas/listado_noticia.html.php');

Sobreescribes el valor de $items_noticia1, con las de todo el listado por eso no te filtra.

Saludos.