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());
edit view
<p><select>
<?php foreach($conds as $cond): ?>
<option value="<?php echo $cond['id'] ?>"><?php echo
$cond['Condition'] ?></option>
<?php endforeach; ?>
</select></p>
This returns the id for each condition, but only 1 character of it!. I
turned debug on and in the SQL I can see
SELECT 'Condition'.'id' FROM 'conditions' as 'Condition' WHERE 1=1
Now thats some bizzare SQL!
Any Ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---