Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/06/2007, 06:10
TomasART
 
Fecha de Ingreso: enero-2007
Mensajes: 43
Antigüedad: 17 años, 4 meses
Puntos: 0
Re: Otra de novatos

Os comento, puedo sacar el siguiente registro pero no el anteriro. Me vuelve siempre al primer registro.

Código:
  //Saca el siguiente registro
      $querySEG = "SELECT * FROM products_description where product_id > '".$id."' AND campaign_categorie_id = '" . $categoria ."' ORDER BY '".$id."' LIMIT 1";
      
      //Saca el anterior registro      
      $queryANT = "SELECT * FROM products_description where product_id < '".$id."' AND campaign_categorie_id = '" . $categoria ."' ORDER BY '".$id."' DESC LIMIT 1";