Thursday, September 5, 2013

Re: cakePHP beginner: first app; some questions

Also, you'll need to put the 'present' column in a separate table. Otherwise, you'll be continually overwriting the one field. Instead, consider a table wherein each row points back to a specific User. This table would, at a minimum, have the date (use 'created' and it will be filled in automatically), a user_id, and tinyint(1) column named present.


On Fri, Aug 30, 2013 at 9:44 AM, Florian Beijers <florianbeijers@gmail.com> wrote:
Hi,

For my very first cakePHP app I'd like to do the following:
- I have a table in a db which contains columns for a person's name, and two integer columns named Present and NotPresent.
- What I wish to do is give the app the possibility to a. Add new users (which would add 0 in both present and notPresent columns to start with), b. Show the users listed in the table with checkboxes next to them denoting if that user is Present or NotPresent. c. I want these checkboxes to update the integer columns when the form is submitted. and D. I want the app to be able to simply list the users with the amount of times present and notPresent in a table, where this can be sorted.

Would it be smart to start with scaffold in this case? I am a very green cakePHP coder so if this is an incredibly stupid question, please cut me some slack :)

Regards,
Florian

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: