Re: using id how to get the details
Also ... stop flooding the forum with duplicate threads! You have so far created 7 threads to the group, with 6 of those being duplicated. Such action is only going to limit the amount of people willing to help you. Post a message and wait for a reply, if it does not come within 24 hours then you can bump your thread, but please realise this is an open-source community so it can take a while to get a reply. As Jeremy states, read book.cakephp.org (until you can action and understand it's contents) ... the problems you are struggling with are the very basics of CakePHP and the solutions are very well covered by the book. Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: using id how to get the details
Sorry - but that's the wrong answer and defeats one of the main purposes of using a framework like Cake. Queries are the avenue of last resort. First, I'd look at the conventions: http://book.cakephp.org/view/901/CakePHP-Conventions I recommend this because your campaign table should really be called campaigns. Create a model for each table. http://book.cakephp.org/view/1001/Understanding-Models Then, set up your model associations: http://book.cakephp.org/view/1039/Associations-Linking-Models-Together This effectively joins your tables together in a consistent, repeatable and re-useable manner. Then you can build structured finds really easily: http://book.cakephp.org/view/1018/find I'd really recommend you incorporate the Containable behaviour too: http://book.cakephp.org/view/1323/Containable So an example might be: $this->Campaign->find( 'all', array( 'contain' => array( 'User' ) ) ); This does a find all on the Campaign model (on the campaigns table) and includes related User records (from the users table). You can add conditions, restrict fields and do so much more from this simple set up. I know that sometimes all you want is a quick, one line answer, but if you are new to Cake I'd really recommend getting to grips with the basics. A little time invested now will reap rewards in the long term. Jeremy Burns jeremybu...@me.com On 5 May 2010, at 07:31, Master Ram wrote: > Ok sir i got it > > On May 5, 11:18 am, Ramkumar Ramkumar wrote: >> hey bro use the queries with joins >> >> >> >> On Wed, May 5, 2010 at 11:42 AM, Master Ram wrote: >>> hi.. all i am new to cakephp. >> >>> i have table called campaign: this table containing "user_id" form >>> users table. i want to get user details form user table. and i want to >>> display the result of both table campaign and users table. >> >>> how to do. this >> >>> please help me >> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others >>> with their CakePHP related questions. >> >>> 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.comFor >>> more options, visit this group at >>> http://groups.google.com/group/cake-php?hl=en >> >> -- >> Thanks & Regards, >> M.Ramkumar >> >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others >> with their CakePHP related questions. >> >> 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 >> athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: using id how to get the details
Ok sir i got it On May 5, 11:18 am, Ramkumar Ramkumar wrote: > hey bro use the queries with joins > > > > On Wed, May 5, 2010 at 11:42 AM, Master Ram wrote: > > hi.. all i am new to cakephp. > > > i have table called campaign: this table containing "user_id" form > > users table. i want to get user details form user table. and i want to > > display the result of both table campaign and users table. > > > how to do. this > > > please help me > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en > > -- > Thanks & Regards, > M.Ramkumar > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > 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 > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: using id how to get the details
hey bro use the queries with joins On Wed, May 5, 2010 at 11:42 AM, Master Ram wrote: > hi.. all i am new to cakephp. > > i have table called campaign: this table containing "user_id" form > users table. i want to get user details form user table. and i want to > display the result of both table campaign and users table. > > how to do. this > > please help me > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- Thanks & Regards, M.Ramkumar Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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