Re: Select list behaviour

2007-06-01 Thread francky06l
Well I think because I was thinking the field you wanted to associate with your id was condition, but was is the real name of this field into the database ? On May 31, 4:19 pm, g5Maniac [EMAIL PROTECTED] wrote: No, you are not misunderstanding the problem, and thankyou for your response!

Select list behaviour

2007-05-31 Thread g5Maniac
Hi All, I am tyring to generate a select list in an edit view - all very basic stuff. I am however getting the wierdes result to my query. diagnosis_controller (edit) $this-Diagnosis-id = $id; $this-data = $this-Diagnosis-read(); $this-set('conds',$this-Diagnosis-Condition-generateList());

Re: Select list behaviour

2007-05-31 Thread francky06l
You explanation is not so clear, but I think you mean that the generateList returns only the id and not the 'Condition' field ? If so, generateList is by default making the array of the fields named 'id' and 'name'. As you might not have a 'name' field, you can set it into the model or pass

Re: Select list behaviour

2007-05-31 Thread g5Maniac
No, you are not misunderstanding the problem, and thankyou for your response! $this-set('conds',$this-Diagnosis-Condition-generateList(null, null, '{n}.Condition.id','{n}.Condition.condition')); entering that in my controller results in a sql syntax error Query: SELECT `Condition`.`id`,