I know this mailing list must receive a modest amount of praise for
such a wonderful framework. I don't know a lot about PHP but CakePHP
makes it easy, just set up the database and bake away.

I recently ran into a problem in one of the cake apps I'm building. It
is not due to CakePHP.

One of my database tables is called "eagles" and eagles belongs to a
tournament, now there will be around 20 entries for eagles per
tournament, at first I thought "no problem, use hasMany" but due to
complexity ended up just making the table as follows:

id
created
modified
name1
hole1
...
name20
hole20

I know this is wrong but it works! I can use a simple hasOne
relationship hehe.

the main thing i had a problem with was pulling up the last 20 records
of $tournament_id and then in the view printing it out. I was trying
to use this find statment find('all',array('limit' => '20', 'order' =>
'id DESC') but php was just giving me a nice white screen. wierd thing
is I can just use find('first', array('order' => 'id DESC') no problem





--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to