Hi Mates,

As currently I am working on a project of some directory. I am
frequently landing up into a strange problem.
Initially, when I set up the installation, and start working with
models, controllers and views. everything is ok. but the problem arise
when I run the single view function. Let me explain with an example:

I have tables like: Medicine, Manufacturer, Origin, etc.
Similarly I have models and controllers. The relations are.
manufacturers hasMany medicines; Origin hasMany medicines ; medicines
belongsTo manufacturers and origin.

now I have four functions in my medicine controller:
index (which is a search form)
search (search function and logic)
result (that renders the search result)
details (that displays individual details of each post.)

When I search using form there is no problem, I get the results
according with various joins. The results has a link to details view
like this:

function details($id = null) {
 //all logic here
}

The problem arises here. I am able to land up in correct page.but the
view is unable to show me join data. where ever the datas are from
other tables like manufacturers and origin and others, it shows a
Undefined index like this:

Notice (8): Undefined index:  Manufacturer [APP/views/medicines/
detail.ctp, line 10]

Notice (8): Undefined index:  Origin [APP/views/medicines/detail.ctp,
line 18]

All other data that is from same table of medicines show correctly.

May anyone point me in right direction, please. I am totally
frustrated in this and messed up. I cant find this solution anywhere
over internet. I am using CakePHP 1.3.6 installation.

I made 4 fresh installation but the results are same.

Please help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to