God bless you!!
On Wed, Sep 23, 2009 at 9:22 PM, Marcelo Andrade <mfandrade@gmail.com> wrote:
2009/9/23 stevengc <gracans777@gmail.com>:
> (..)
> Necesito que a la hora de guardar los valores.. al title yo puedaTrivial: just fetch the value for the Subcategory.
> concatenarle el text de subCategory
>
> ejemplo: necesito que la salida sea algo asi: Titulo prueba (San
> Ramon)
>
> Yo hice lo siguiente
> :
> $this->data['Categoriesinad']['title'] = $this->data['Categoriesinad']
> ['title'].' ('.$this->data['Categoriesinad']['subcategory_id'].')';
>
> pero la salida es ésta: Titulo prueba (1), quiero decir que obtengo el
> id pero necesito el texto.
$this->Categoriessinad->Subcategory->id=
$this->data['Categoriesinad']['subcategory_id'];
$subcat= $this->Categoriessinad->Subcategory->read();
$val= $subcat['Subcategory']['description'];
$this->data['Categoriesinad']['title'] =
$this->data['Categoriesinad']['title'].' ('.$val.')';
Adjust to your case.
Best regards.
--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment