I have two fields in my table that I want to display as one field in
my add form.
ie: dorm_building, dorm_room = dorm_assignment (field names)
ie: South, 203 = South 203 (field values)

I have the following code in my controller:

$available_rooms = $this->Dorm->generateList(array('available' =>
'Y'), null, null, '{n}.Dorm.id', '{n}.Dorm.dorm_room');
$this->set('available', $available_rooms);

Which only shows me the "dorm_room" and only one record in my add
form.

I suspect that I may need to upgrade my version of my Core CakePHP in
order to make use of a combined valuePath, as seen in the statement
below:

$available_rooms = $this->Dorm->generateList(array('available' =>
'Y'), null, null, '{n}.Dorm.id', array('{0}-{1}',
'{n}.Dorm.dorm_building', '{n}.Dorm.dorm_room'));

The above statement gives me no records in the add form.

However, when I upgrade my core Cake, my other apps stop working. So
here are my questions:

1. Without upgrading can I combine two fields into one displayed field
without using CONCAT or any work on the DB side? (most efficient way
possible)

2. If I need to point my "dorm app" to the new version of Cake, what
syntax do I need to enter so that it works? I tried modifying the
webroot/index.php file to point to the new version of cake, and I
received errors that the page could not be found.

While I've been working with PHP for some time, I am not a programmer.
That being said, your patience with my ignorance is appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to