| Subject: | Urgent Help--Please |
|---|---|
| From: | Tapan Kumar Thapa |
| Date: | Sun, 20 Feb 2011 19:28:30 +0530 |
|
Hello Community, I have an export function in my controller. function export() { $this->layout = ''; $startdate = $this->Session->read('startdate'); $enddate = $this->Session->read('enddate'); $this->set('Export', $this->Incoming->find('all', array( 'fields' => array('date', 'time', 'msisdn', 'shortcode', 'operator', 'circle', 'keyword', 'answer', 'age', 'gender'), 'order' => "Incoming.id desc", 'conditions' => array("Incoming.created >= '$startdate' AND Incoming.created <= '$enddate' "), 'contain' => false))); } I want this control look like this. function export() { $this->layout = ''; $startdate = $this->Session->read('startdate'); $enddate = $this->Session->read('enddate'); $this->set('Export', $this->Incoming->find('all', array( 'fields' => array('date_format(date, '%d-%b-%y') as date', 'time', 'msisdn', 'shortcode', 'operator', 'circle', 'keyword', 'answer', 'age', 'gender'), 'order' => "Incoming.id desc", 'conditions' => array("Incoming.created >= '$startdate' AND Incoming.created <= '$enddate' "), 'contain' => false))); } Please suggest. Regards Tapan Thapa India -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: Variables for Validation, Krissy Masters |
|---|---|
| Next by Date: | Re: Variables for Validation, John Andersen |
| Previous by Thread: | Variables for Validation, Krissy Masters |
| Next by Thread: | Re: Urgent Help--Please, John Andersen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |