Hello everyone,

I new to CakePHP and i'm having some dificulties to find the best way
to relate 3 tables ( models ) using scafold.

the application is a simple beting sistem for football results

bets table, where user,event and result tables ( models ) are related

Field   Type    Allow Null      Default Value
user_id int(11) unsigned        No
event_id        int(11) unsigned        No
result_id       int(11) unsigned        No
created datetime        No
modified        datetime        No

users table

Field   Type    Allow Null      Default Value
id      int(10) unsigned        No
username        varchar(50)     No
password        varchar(50)     No
fname   varchar(50)     No
lname   varchar(50)     No
email   varchar(100)    No
group_id        int(10) unsigned        No      0
active  tinyint(1) unsigned     No      0
created datetime        No      0000-00-00 00:00:00
modified        datetime        No      0000-00-00 00:00:00

results table

Field   Type    Allow Null      Default Value
id      int(11) unsigned        No
description     varchar(10)     No
value   decimal(3,2)    No
created datetime        No
modified        datetime        No

events

Field   Type    Allow Null      Default Value
id      int(11) unsigned        No
description     varchar(50)     No
comment varchar(500)    Yes
result_id       int(11) Yes
pool_id int(11) No
created datetime        No
modified        datetime        No
date    datetime        No

in this table result_id is here is registered the final result of the
event.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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