The name is
Mike Myat Min Han aka 'mmhan'.

I am a developer, mostly do development on Javascript, PHP and CakePHP alongside some development work on C, C++, Obj-C, C# and AS. I also have a thing for Python.

I post here all sorts of crap that I find worthy of sharing: Quotes, Jokes and Notes.

You can check out my blog and follow me on twitter.


Posts tagged cakephp


Text

May 14, 2011
@ 12:41 am
Permalink

11 notes

CakePHP HABTM relation Data Format

The following is the format for $data that CakePHP expect on your Model->saveAll($data) call, using the example of Article and Tags.

array(
    'Article' => array(
        //Article data goes here as usual
    )
    'Tag' => array(
        'Tag' => array(
            1,
            2,
            3
        )
    )
);

Just thought I should note down in case I forget again, like I just did.


Text

Apr 19, 2010
@ 11:29 am
Permalink

Another meal of spaghetti code for this morning. It’s not the spaghetti code that troubles me. It’s just that it breaks my heart to see that in use for cakephp development.