Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/05/2009, 14:48
Avatar de By_George
By_George
 
Fecha de Ingreso: abril-2009
Ubicación: localhost
Mensajes: 629
Antigüedad: 15 años
Puntos: 19
Respuesta: guardar en variable una columna

hazlo asi:

Código PHP:
$ofertas="";
$sacoofertas="SELECT * FROM ofertas WHERE id_foto=$id AND estado=1";
    
$resultoferta=mysql_query($sacoofertas,$idcon);
    while(
$filaoferta=mysql_fetch_assoc($resultoferta)){
    
$idoferta=utf8_decode($filaoferta['id_oferta']);
    echo 
$idoferta.',';
    
$ofertas.=$idoferta.',';
    }
//fuera del while imprimela
echo $ofertas