Re: plz help me out
$intProfileCnt = pg_numrows($rsProfile); var $intCDLogCnt = $this-Tblcdlog-find( 'count', array( 'conditions' = array( 'Tblcdlog.blnsuccess' = 1 ), 'fields' = array( 'Tblcdlog.dtmcreated' ) ) ); I was tried like this is correct or not i dont know any one can help me out On Wed, Apr 28, 2010 at 3:54 PM, Jeremy Burns jeremylp bu...@me.com wrote: Almost... You need to run finds/counts against the model that is related to your table. For your table tblmusicprofiles your model will be Tblmusicprofile (singular, camel cased). So, for example, your find statement would be something like this: $rsProfile = $this-Tblmusicprofile-find( 'all', array( 'conditions' = array( 'Tblmusicprofile.lngprofile' = '$PROFILE_ID' ), 'fields' = array( 'Tblmusicprofile.strprofilename' ) ) ); I would also recommend looking up the Containable behaviour ( http://book.cakephp.org/view/1323/Containable). Your table naming convention is not ideal. I'd point you towards http://book.cakephp.org/view/903/Model-and-Database-Conventions for more details. Jeremy Burns jeremybu...@me.com jeremybu...@mac.com On 28 Apr 2010, at 11:13, chandrasekhar reddy wrote: I am new for cakephp plz help me out . below statements are correct or wrong . idontknow While converting this sql query into cakephp for result set and count 1. Result set $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); var $rsProfile = $this-tblmusicprofiles-find('all', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 2. count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 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.comcake-php%2bunsubscr...@googlegroups.comFor 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: plz help me out
I was tried like this is correct or not i dont know any one can help me out $rsCDLog = pg_numrows($rsCDLog); var $intCDLogCnt = $this-Tblcdlog-find( 'count', array( 'conditions' = array( 'Tblcdlog.blnsuccess' = 1 ), 'fields' = array( 'Tblcdlog.dtmcreated' ) ) ); On Fri, Apr 30, 2010 at 4:13 PM, Narendra Padala crazycake...@gmail.comwrote: $intProfileCnt = pg_numrows($rsProfile); var $intCDLogCnt = $this-Tblcdlog-find( 'count', array( 'conditions' = array( 'Tblcdlog.blnsuccess' = 1 ), 'fields' = array( 'Tblcdlog.dtmcreated' ) ) ); I was tried like this is correct or not i dont know any one can help me out On Wed, Apr 28, 2010 at 3:54 PM, Jeremy Burns jeremylp bu...@me.comwrote: Almost... You need to run finds/counts against the model that is related to your table. For your table tblmusicprofiles your model will be Tblmusicprofile (singular, camel cased). So, for example, your find statement would be something like this: $rsProfile = $this-Tblmusicprofile-find( 'all', array( 'conditions' = array( 'Tblmusicprofile.lngprofile' = '$PROFILE_ID' ), 'fields' = array( 'Tblmusicprofile.strprofilename' ) ) ); I would also recommend looking up the Containable behaviour ( http://book.cakephp.org/view/1323/Containable). Your table naming convention is not ideal. I'd point you towards http://book.cakephp.org/view/903/Model-and-Database-Conventions for more details. Jeremy Burns jeremybu...@me.com jeremybu...@mac.com On 28 Apr 2010, at 11:13, chandrasekhar reddy wrote: I am new for cakephp plz help me out . below statements are correct or wrong . idontknow While converting this sql query into cakephp for result set and count 1. Result set $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); var $rsProfile = $this-tblmusicprofiles-find('all', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 2. count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 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.comcake-php%2bunsubscr...@googlegroups.comFor 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
plz help me out
I am new for cakephp plz help me out . below statements are correct or wrong . idontknow While converting this sql query into cakephp for result set and count 1. Result set $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); var $rsProfile = $this-tblmusicprofiles-find('all', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 2. count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 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: plz help me out
Almost... You need to run finds/counts against the model that is related to your table. For your table tblmusicprofiles your model will be Tblmusicprofile (singular, camel cased). So, for example, your find statement would be something like this: $rsProfile = $this-Tblmusicprofile-find( 'all', array( 'conditions' = array( 'Tblmusicprofile.lngprofile' = '$PROFILE_ID' ), 'fields' = array( 'Tblmusicprofile.strprofilename' ) ) ); I would also recommend looking up the Containable behaviour (http://book.cakephp.org/view/1323/Containable). Your table naming convention is not ideal. I'd point you towards http://book.cakephp.org/view/903/Model-and-Database-Conventions for more details. Jeremy Burns jeremybu...@me.com On 28 Apr 2010, at 11:13, chandrasekhar reddy wrote: I am new for cakephp plz help me out . below statements are correct or wrong . idontknow While converting this sql query into cakephp for result set and count 1. Result set $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); var $rsProfile = $this-tblmusicprofiles-find('all', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 2. count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 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
plz help me out
I am new for cakephp plz help me out . below statement are correct or wrong . idontknow While converting this sql query into cakephp for result set and count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 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: plz help me out
You haven't changed the table names to model names as I suggested in my last response - change them from tblmusicprofiles to Tblmusicprofile. Then run it again and post back any errors. Jeremy Burns jeremybu...@me.com On 28 Apr 2010, at 11:34, chandrasekhar reddy wrote: I am new for cakephp plz help me out . below statement are correct or wrong . idontknow While converting this sql query into cakephp for result set and count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 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
plz help me out
can i use stripslashes in cakephp directly in cakephp like php .is it work ? $txtProfileName = stripslashes($txtProfileName); 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: plz help me out
ok tahnk you On Wed, Apr 28, 2010 at 4:08 PM, Jeremy Burns jeremybu...@me.com wrote: You haven't changed the table names to model names as I suggested in my last response - change them from tblmusicprofiles to Tblmusicprofile. Then run it again and post back any errors. Jeremy Burns jeremybu...@me.com jeremybu...@mac.com On 28 Apr 2010, at 11:34, chandrasekhar reddy wrote: I am new for cakephp plz help me out . below statement are correct or wrong . idontknow While converting this sql query into cakephp for result set and count $intProfileCnt = pg_numrows($rsProfile); var $intProfileCnt = $this-tblmusicprofiles-find('count', array('conditions' = array('tblmusicprofiles.lngprofile' = '$PROFILE_ID'), 'fields' = array('tblmusicprofiles.strprofilename'))); 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.comcake-php%2bunsubscr...@googlegroups.comFor 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: plz help me out
See if either of these pages help: http://book.cakephp.org/view/1138/stripslashes_deep http://book.cakephp.org/view/1126/convertSlash http://book.cakephp.org/view/1183/Data-Sanitization And while I'm writing, I found these answers by doing a quick search in the online guide. You could try that yourself first ;-) http://book.cakephp.org/view/876/The-Manual Jeremy Burns jeremybu...@me.com (Skype) +44 208 123 3822 (jeremy_burns) (m) +44 7973 481949 (h) +44 208 530 7573 On 28 Apr 2010, at 11:38, chandrasekhar reddy wrote: can i use stripslashes in cakephp directly in cakephp like php .is it work ? $txtProfileName = stripslashes($txtProfileName); 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
plz help me out
hi friends, i am new to cakephp . plz help me out I don't know how to write the cake php code related to the belowe postgre sql code can u help me plz . how can u find out the number of rows in particular colom in table (second statement below). i hav lot queries like this in my project . $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); $intProfileCnt = pg_numrows($rsProfile); regards; chandu. 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
plz help me out
hi i am new to cake php . i don't know how to write controller, model, view related to the below statements . plz help to write the whole code .for this only. i have to take the reference as this i will write the remaining code in my project. if($chkProfileType == ){$chkProfileType = 1;} $txtProfileName = stripslashes($txtProfileName); if($MODE == 2 $txtProfileName == ) { //POPULATE PROFILE NAME if($PROFILE_ID 0) { $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); $intProfileCnt = pg_numrows($rsProfile); if($intProfileCnt 0) { $txtProfileName = pg_result($rsProfile,0,'strprofilename'); } } } i need like this 1). ex_controller.php ? 2). index.ctp ? 3).ex.php (model). ? 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: plz help me out
Read though the cakephp book - book.cakephp.org do the blog tutorial (a few times) search the google group (your question may well have been asked and answered before) google is a great suorce of much of the information you require eg google migrating to cakephp I know there are articles with advice on making you app work and benefit from the conventions that cake uses bakery.cakephp.org lots of plugins etc are available on github get debugkit it will help you - you don't need to know git to get the code (svn works too; all code can be downloaded in archives) - S On 29 April 2010 05:49, chanducake chanduc...@gmail.com wrote: hi friends, i am new to cakephp . plz help me out I don't know how to write the cake php code related to the belowe postgre sql code can u help me plz . how can u find out the number of rows in particular colom in table (second statement below). i hav lot queries like this in my project . $rsProfile = pg_exec($conn,SELECT strprofilename FROM tblmusicprofiles WHERE lngprofile = $PROFILE_ID); $intProfileCnt = pg_numrows($rsProfile); regards; chandu. 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.comcake-php%2bunsubscr...@googlegroups.comFor 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