Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 545

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 545

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

I had 5 minutes, and CakePHP.

Sunday, April 1. 2007

I had five minutes to do something before I decided that I wanted to watch a movie...I'm now putting that off simply to report back on what I got out of my time.

For the background information...I just discovered that the person traditionally in charge of handling my high school's class reunions, is out of the country and could probably care less over handling everything...so we need something up quick and dirty.
Here's the database dump:


Here's the Model code:


...and here's the Controller code:



In a matter of about 5 minutes, I had a fully working website based access page for this table that will work in both PHP4 and PHP5 (thus the usage of var instead of public -- so don't use this in E_STRICT under PHP5). Obviously, I have a lot more work ahead of me, but for simple things, you can certainly imagine how nice this is. It's quite helpful for more in-depth things as well. ;)

To reiterate:
1.) Create database (I used a GUI, so it was even quicker).
2.) Create PHP model class, extending default AppModel in CakePHP.
3.) Create scaffolded Controller.
4.) Save
5.) View
6.) ...done...

Just for clarification, I do know that the plural of Alumni is Alumns, not Alumnis...but I was in a hurry and couldn't remember where to find the file that handles plural forms of words to check and see if Alumni was listed anywhere...so I did it this way, albeit incorrect, but safer programatically, for the time being.

Update:
I just realized that in those 2 minutes I took to think up and create the database table, I missed a couple important fields, such as password and email address. To take care of this accidental oversight, there is no PHP code that needs to be modified. I could modify the model class for validation handling, but it's not necessary -- the scaffolding will still automatically detect the proper fields and magically change the PHP form used to manipulate the data. Instead, all that needs to be modified is the database table(s).

Trackbacks


Trackback specific URI for this entry

    Strict Standards: Only variables should be assigned by reference in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 73
    No Trackbacks

Comments



    Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_comments.inc.php on line 292

    Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

    Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_comments.inc.php on line 390

    Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 114

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 114

    Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_comments.inc.php on line 390

    Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 114

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 114

    Strict Standards: Only variables should be assigned by reference in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 73
    #1 Jen on 05/06/07 at 09:36 PM [Reply]
    Cool! I'm just getting started with learning CakePHP and I'm already astounded at how quick it is to do things (and I'm just learning PHP as well!). Nice to see the basic steps laid out for newbies like me.

    Thanks!
    #1.1 Brendon Kozlowski on 05/12/07 at 11:13 AM [Reply]
    Jen,

    Although you're an automated response (as governed by your referring URL and original -deleted- homepage address), I appreciate the feedback. ;)

Add Comment


Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 545

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

BBCode format allowed

   


Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/brendonk/mysiteonline.org/life/include/db/mysql.inc.php on line 270

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_config.inc.php on line 523

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::enum_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 956

Strict Standards: Non-static method serendipity_plugin_api::load_plugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 963

Strict Standards: Non-static method serendipity_plugin_api::probePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 542

Strict Standards: Non-static method serendipity_plugin_api::getClassByInstanceID() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 492

Strict Standards: Non-static method serendipity_plugin_api::includePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 497

Strict Standards: Declaration of serendipity_event_spartacus::event_hook() should be compatible with serendipity_event::event_hook($event, &$bag, &$eventData, $addData = NULL) in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 0

Strict Standards: Non-static method serendipity_plugin_api::get_plugin_title() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 967

Strict Standards: Non-static method serendipity_plugin_api::load_plugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 963

Strict Standards: Non-static method serendipity_plugin_api::probePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 542

Strict Standards: Non-static method serendipity_plugin_api::getClassByInstanceID() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 492

Strict Standards: Non-static method serendipity_plugin_api::includePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 497

Strict Standards: Declaration of serendipity_event_dpsyntaxhighlighter::event_hook() should be compatible with serendipity_event::event_hook($event, &$bag, &$eventData, $addData = NULL) in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 0

Strict Standards: Non-static method serendipity_plugin_api::get_plugin_title() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 967

Strict Standards: Non-static method serendipity_plugin_api::load_plugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 963

Strict Standards: Non-static method serendipity_plugin_api::probePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 542

Strict Standards: Non-static method serendipity_plugin_api::getClassByInstanceID() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 492

Strict Standards: Non-static method serendipity_plugin_api::includePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 497

Strict Standards: Declaration of serendipity_event_nl2br::event_hook() should be compatible with serendipity_event::event_hook($event, &$bag, &$eventData, $addData = NULL) in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 0

Strict Standards: Declaration of serendipity_event_nl2br::uninstall() should be compatible with serendipity_plugin::uninstall(&$propbag) in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 0

Strict Standards: Non-static method serendipity_plugin_api::get_plugin_title() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 967

Strict Standards: Non-static method serendipity_plugin_api::load_plugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 963

Strict Standards: Non-static method serendipity_plugin_api::probePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 542

Strict Standards: Non-static method serendipity_plugin_api::getClassByInstanceID() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 492

Strict Standards: Non-static method serendipity_plugin_api::includePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 497

Strict Standards: Non-static method serendipity_plugin_api::get_plugin_title() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 967

Strict Standards: Non-static method serendipity_plugin_api::load_plugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 963

Strict Standards: Non-static method serendipity_plugin_api::probePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 542

Strict Standards: Non-static method serendipity_plugin_api::getClassByInstanceID() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 492

Strict Standards: Non-static method serendipity_plugin_api::includePlugin() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 497

Strict Standards: Declaration of serendipity_event_bbcode::event_hook() should be compatible with serendipity_event::event_hook($event, &$bag, &$eventData, $addData = NULL) in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php on line 0

Strict Standards: Declaration of serendipity_event_bbcode::uninstall() should be compatible with serendipity_plugin::uninstall(&$propbag) in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php on line 0

Strict Standards: Non-static method serendipity_plugin_api::get_plugin_title() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 967

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_config.inc.php on line 523

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/serendipity_config.inc.php on line 406

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/genpage.inc.php on line 32

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::count_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/genpage.inc.php on line 35

Strict Standards: Non-static method serendipity_plugin_api::count_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/genpage.inc.php on line 36

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_entries.inc.php on line 514

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_entries.inc.php on line 572

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_entries.inc.php on line 555

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_entries.inc.php on line 997

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_entries.inc.php on line 1086

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 114

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/brendonk/mysiteonline.org/life/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php on line 114

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_entries.inc.php on line 1156

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_comments.inc.php on line 292

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012

Strict Standards: Only variables should be assigned by reference in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 73

Strict Standards: Only variables should be assigned by reference in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 73

Strict Standards: Only variables should be assigned by reference in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 73

Strict Standards: Non-static method serendipity_plugin_api::hook_event() should not be called statically in /home/brendonk/mysiteonline.org/life/include/functions_smarty.inc.php on line 545

Strict Standards: Non-static method serendipity_plugin_api::get_event_plugins() should not be called statically in /home/brendonk/mysiteonline.org/life/include/plugin_api.inc.php on line 1012