well ok serializing/unseriazing is still different than implode/explode both are not very handy though
implode could be better if you want to search your in your "pseudo array" with LIKE %{...}% serializing if you dont want to do anything expect then saving/reading hasMany or even HABTM as Robert stated would be the best choice in most cases especially as cake has beautiful automation for it anyway On 7 Aug., 16:46, "euromark (munich)" <dereurom...@googlemail.com> wrote: > i wouldn't say that vijay was incorrect - he ment the same thing, just > didn't express it as clear as you, miles :) > > either way it is way cleaner to normalize the database - this way you > have more control over the multiple choices > and if you delete one "choice", you can make sure it is not related to > any record (with your arrays as serialized string this is not a nice > thing to do) > > On 7 Aug., 04:15, Robert P <shiftyrobs...@gmail.com> wrote: > > > Well, if Books can have more than one Author in your system then it's: > > Authors hasAndBelongsToMany Books > > Books hasAndBelongsToMany Authors > > > But if each book can only have one Author then it would be: > > Authors hasMany Books > > Book belongsTo Author > > > with the foreign keys set up as required. > > > Please read the Cookbook > > -http://book.cakephp.org/view/78/Associations-Linking-Models-Together > > > On Aug 7, 8:29 am, Rawna <asumaw...@gmail.com> wrote: > > > > On Aug 7, 2:48 am, Vijay Kumbhar <k.vidn...@gmail.com> wrote: > > > > > Better way please create new table that will take the book_id & the > > > > auther_id so that you can associate the models. > > > > What Model relationship should I do to create that? Could you please > > > give an example? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---