I have two tables.
CREATE TABLE `restaurants` ( `id` int(4) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `street` varchar(255) NOT NULL, `area` varchar(255) NOT NULL, `pincode` int(11) NOT NULL, `zone_id` tinyint(1) NOT NULL, `lat` decimal(10,0) NOT NULL, `long` decimal(10,0) NOT NULL, `avgCost` int(5) NOT NULL, `buffet` tinyint(1) NOT NULL, `catering` tinyint(1) NOT NULL, `homeDelivery` tinyint(1) NOT NULL, `reservation` tinyint(1) NOT NULL, `valetParking` tinyint(1) NOT NULL, `amex` tinyint(1) NOT NULL, `master` tinyint(1) NOT NULL, `visa` tinyint(1) NOT NULL, `foodCoupon` tinyint(1) NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE `phones` ( `id` int(11) NOT NULL auto_increment, `restaurant_id` int(11) NOT NULL, `number` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; i baked the models, controllers, views with scafolding. now from inside the Restaurant Controller CRUD methods how can i make entries to phones tables while ADD/EDITING/DELETING etc when i hit Add restaurant. there should be a field that allows be to enter phone numbers. when i hit save it should save it to the phones tables. -- View this message in context: http://n2.nabble.com/access-other-models-for-CRUD-tp2513431p2513431.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
