Re: hasMany Issue - no data loads
I tested your data ,it isn't wrong , has many also contain invoked information between EventSignUp and EventOptionSignUp, please send all your relevant file to me , I will try test to help you and answer for you as soon as, if you have yahoomail please add my one, nhathoangvn2...@yahoo.com. 2009/3/9 Sanfly san...@gmail.com Hi All Ive been trying to get a hasMany association working, but It just wont seem to work. The pages which use this model simply wont load when I try to run them I have two databases: events_signups, events_options_signups Each signup can have many different options, which is why I have the table events_options_signups to link them. The field in events_options_signups table has a field event_signup_id where I store the id of the events_signups entry it belongs to In my EventsOptionsSignup model I have a belongsTo association which works great: var $belongsTo = array( 'EventsSignup' = array('className' = 'EventsSignup', 'foreignKey' = 'event_signup_id', ) ); But I cant get the hasMany association to work when going the other way, and i need to be able to extract that data when searching by EventsSignup var $hasMany = array( 'EventsOptionsSignup' = array('className' = 'EventsOptionsSignup', 'foreignKey' = 'event_signup_id', ), ); Is there anything im doing wrong that is obvious to anyone? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: hasMany Issue - no data loads
I always have it set to 2 on my test system. The page simply doesnt load. In firefox I get a no data sent error. In IE I get a cant find page error. On Mar 10, 6:21 pm, mscdex msc...@gmail.com wrote: On Mar 9, 1:14 am, Sanfly san...@gmail.com wrote: Hi All Ive been trying to get a hasMany association working, but It just wont seem to work. The pages which use this model simply wont load when I try to run them What does Cake say when you have 'debug' set to 2 in config\core.php? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: hasMany Issue - no data loads
dear Sanfly,I hope you can post your database to forum, this is more convenience for us 2009/3/9 Sanfly san...@gmail.com Hi All Ive been trying to get a hasMany association working, but It just wont seem to work. The pages which use this model simply wont load when I try to run them I have two databases: events_signups, events_options_signups Each signup can have many different options, which is why I have the table events_options_signups to link them. The field in events_options_signups table has a field event_signup_id where I store the id of the events_signups entry it belongs to In my EventsOptionsSignup model I have a belongsTo association which works great: var $belongsTo = array( 'EventsSignup' = array('className' = 'EventsSignup', 'foreignKey' = 'event_signup_id', ) ); But I cant get the hasMany association to work when going the other way, and i need to be able to extract that data when searching by EventsSignup var $hasMany = array( 'EventsOptionsSignup' = array('className' = 'EventsOptionsSignup', 'foreignKey' = 'event_signup_id', ), ); Is there anything im doing wrong that is obvious to anyone? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: hasMany Issue - no data loads
dear Sabfly According to me, you don't wrong in this case, I haven't discovered why the information of EventsSignUp don't link with the one of EventsOptionsSignUp, please send me your database to me to help you test again. 2009/3/9 nhathoang nhathoang computing1...@gmail.com dear Sanfly,I hope you can post your database to forum, this is more convenience for us 2009/3/9 Sanfly san...@gmail.com Hi All Ive been trying to get a hasMany association working, but It just wont seem to work. The pages which use this model simply wont load when I try to run them I have two databases: events_signups, events_options_signups Each signup can have many different options, which is why I have the table events_options_signups to link them. The field in events_options_signups table has a field event_signup_id where I store the id of the events_signups entry it belongs to In my EventsOptionsSignup model I have a belongsTo association which works great: var $belongsTo = array( 'EventsSignup' = array('className' = 'EventsSignup', 'foreignKey' = 'event_signup_id', ) ); But I cant get the hasMany association to work when going the other way, and i need to be able to extract that data when searching by EventsSignup var $hasMany = array( 'EventsOptionsSignup' = array('className' = 'EventsOptionsSignup', 'foreignKey' = 'event_signup_id', ), ); Is there anything im doing wrong that is obvious to anyone? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: hasMany Issue - no data loads
Here are my database tables: CREATE TABLE `events_signups` ( `id` int(10) NOT NULL auto_increment, `member_id` int(10) NOT NULL, `event_id` int(10) NOT NULL, `event_option_id` int(10) NOT NULL, `name` varchar(100) NOT NULL, `email` varchar(50) NOT NULL, `phone` varchar(50) NOT NULL, `total_cost` varchar(10) NOT NULL, `payment_id` int(10) NOT NULL, `confirmed` datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB; CREATE TABLE `events_options_signups` ( `id` int(10) NOT NULL auto_increment, `event_option_id` int(10) NOT NULL default '0', `event_signup_id` int(10) NOT NULL default '0', `quantity` int(10) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; On Mar 9, 8:56 pm, nhathoang nhathoang computing1...@gmail.com wrote: dear Sabfly According to me, you don't wrong in this case, I haven't discovered why the information of EventsSignUp don't link with the one of EventsOptionsSignUp, please send me your database to me to help you test again. 2009/3/9 nhathoang nhathoang computing1...@gmail.com dear Sanfly,I hope you can post your database to forum, this is more convenience for us 2009/3/9 Sanfly san...@gmail.com Hi All Ive been trying to get a hasMany association working, but It just wont seem to work. The pages which use this model simply wont load when I try to run them I have two databases: events_signups, events_options_signups Each signup can have many different options, which is why I have the table events_options_signups to link them. The field in events_options_signups table has a field event_signup_id where I store the id of the events_signups entry it belongs to In my EventsOptionsSignup model I have a belongsTo association which works great: var $belongsTo = array( 'EventsSignup' = array('className' = 'EventsSignup', 'foreignKey' = 'event_signup_id', ) ); But I cant get the hasMany association to work when going the other way, and i need to be able to extract that data when searching by EventsSignup var $hasMany = array( 'EventsOptionsSignup' = array('className' = 'EventsOptionsSignup', 'foreignKey' = 'event_signup_id', ), ); Is there anything im doing wrong that is obvious to anyone? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: hasMany Issue - no data loads
On Mar 9, 1:14 am, Sanfly san...@gmail.com wrote: Hi All Ive been trying to get a hasMany association working, but It just wont seem to work. The pages which use this model simply wont load when I try to run them What does Cake say when you have 'debug' set to 2 in config\core.php? --~--~-~--~~~---~--~~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---