Ver Mensaje Individual
  #9 (permalink)  
Antiguo 09/04/2010, 08:48
Avatar de GXT2
GXT2
 
Fecha de Ingreso: junio-2009
Ubicación: Fort Lauderdale, FL
Mensajes: 152
Antigüedad: 15 años, 9 meses
Puntos: 0
Respuesta: Convertir un objeto a string

creo que tendria que quedar asi
Código PHP:
class LasSavedCatId{//hh

  
function __construct() { //lw

    
$this->Las_Saved_Cat_Id();
  
  
  }
//lw
  
  
  
protected function Las_Saved_Cat_Id() {//kl
  
        /*cojo el nombre de la base de datos para grabarla
        en la tbala de los productos seleccionados*/
        
$sQuery"SELECT *
            FROM saved_category
            Order by s_cat_id DESC"
;
             echo  
"<br>".$sQuery;
            
$rsDatos mysql_query ($sQuery)
            or die (
"Error geting room").mysql_error();
            
$Datos mysql_fetch_array($rsDatos); 
        
          
$get_last_id =  $Datos['s_cat_id'];
          
$this->last_id $get_last_id;

  
  }
//kl

    
public function __toString()
    {
        return 
$this->last_id;
    }


}
//hh 
Pero como lo llamo ?