Only problem I have is that now the structure is not desirable to test if a user has the correct amount of attendances as set in the form.
Returned data example:
Array ( [0] => Array ( [Attendance] => Array ( [id] => 85 [created] => 2012-08-28 [modified] => 2012-08-29 06:27:04 [user_id] => 129 [program_id] => 1 [school_id] => 1 ) [User] => Array ( [id] => 129 ) ) [1] => Array ( [Attendance] => Array ( [id] => 84 [created] => 2012-08-26 [modified] => 2012-08-29 06:25:18 [user_id] => 107 [program_id] => 1 [school_id] => 1 ) [User] => Array ( [id] => 107 ) ) [2] => Array ( [Attendance] => Array ( [id] => 83 [created] => 2012-08-25 [modified] => 2012-08-29 06:24:53 [user_id] => 128 [program_id] => 1 [school_id] => 1 ) [User] => Array ( [id] => 128 ) ) [3] => Array ( [Attendance] => Array ( [id] => 81 [created] => 2012-08-28 [modified] => 2012-08-29 03:30:59 [user_id] => 107 [program_id] => 1 [school_id] => 1 ) [User] => Array ( [id] => 107 ) )
For example if $form_attendance = 2 I would like to do a simple foreach on the attendance to see if the count matches $form_attendance. In the format that is returned I do not now how to do this :(
Thank you
Robert
--
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
No comments:
Post a Comment