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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Wednesday, April 28, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment