Re: SQL sum function to store as single variable

2012-04-25 Thread jasonix
On Apr 24, 2:48 am, 0x20h k...@informatik.uni-marburg.de wrote: Am 22.04.2012 20:24, schrieb kdubya: [...] This can be written as a find(): $total = $this-CustomerPurchases-find('first', array('conditions'=array('customerbill_id'=$billid),

Re: SQL sum function to store as single variable

2012-04-25 Thread Jeremy Burns | Class Outfit
Cake finds return arrays. Simply extract the value you want from the array. Jeremy Burns Class Outfit http://www.classoutfit.com On 25 Apr 2012, at 08:33:53, jasonix wrote: On Apr 24, 2:48 am, 0x20h k...@informatik.uni-marburg.de wrote: Am 22.04.2012 20:24, schrieb kdubya: [...] This

Re: SQL sum function to store as single variable

2012-04-25 Thread LITTO CHACKO
i think this will work *$totalamt=$total[0]['CustomerPurchases'][''SUM(amount)'];* *return $totalamt;* On Wed, Apr 25, 2012 at 1:03 PM, jasonix jayhina...@gmail.com wrote: On Apr 24, 2:48 am, 0x20h k...@informatik.uni-marburg.de wrote: Am 22.04.2012 20:24, schrieb kdubya: [...] This

Re: Too many redirects when login-user access the control they don't allow to go

2012-04-25 Thread euromark
yeah but my proposal about correcting this redirect hasnt been applied right at the beginning of 2.0 as far as I know still, I think the main issue might be solvable by debugging the redirects -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the

QuickApps and Croogo

2012-04-25 Thread kani
What is diffrence and how compatible with cakephp core. -- 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,

Creating 2 differenz queries in the Model Controller - How do I access from the View?

2012-04-25 Thread Ivo Wolgensinger
Hi I have in my Model something like this: - public function getAllPosts() { return $this-find('all', array('contain' = FALSE, 'fields' = array('id','title','created',),)); } public function getSomePosts() { return $this-find('all', array('contain'

Re: Creating 2 differenz queries in the Model Controller - How do I access from the View?

2012-04-25 Thread Jeremy Burns | Class Outfit
Change your last line to: $this-set(compact('allposts', 'someposts')); The variables inside the single quotes are available as like named variables in the view ($allposts and $someposts); Jeremy Burns Class Outfit http://www.classoutfit.com On 25 Apr 2012, at 11:38:18, Ivo Wolgensinger

fmcakemix installation problems

2012-04-25 Thread malcolm
Is anyone using fmCakeMix? I have new install of Cake v2.0.5 and I want to use a filemaker data source. I've followed the instructions that come with fmcakemix to the letter but I'm still getting the error Cake is NOT able to connect to the database. fmCakeMix sits between Cake and a library

2.1.x API

2012-04-25 Thread Mohammad Naghavi
Hi all, today I downloaded the CakePHP 2.1.1 for the first time and started a new project with it, what I just saw at first look at the default layout source was $this-fetch(..) commands that I have not seen in CakePHP 1.x or 2.0, so I wanted to look it up in API but it was very interesting that

Re: 2.1.x API

2012-04-25 Thread euromark
its all in the documentation: http://book.cakephp.org/2.0/en/views.html and http://book.cakephp.org/2.0/en/views.html#view-blocks note the New in version 2.1. label Am Mittwoch, 25. April 2012 14:54:02 UTC+2 schrieb Mohammad Naghavi: Hi all, today I downloaded the CakePHP 2.1.1 for the

Re: Email Form on Static Page

2012-04-25 Thread Scott Taylor
The email doesn't send. As far as i can tell the function email() in the controller doesn't even run. The submit button just opens a page /pages/email and that doesn't even have a .ctp file. So I am super confused right now... I just need a contact form that sends and email on a static page. --

Re: QuickApps and Croogo

2012-04-25 Thread Christopher Castro
Better try both and see by yourself: http://demo.quickappscms.org/ http://wiki.croogo.org/1.4/getting-started/demo Both are capable to do the same things, with more or less effort. - QACMS is strongly inspired by Drupal and built on Cake 2.1. - Croogo is inspired by Wordpress, and it's latest

Re: Redirect on new domain with alert

2012-04-25 Thread Chris Cinelli
After some digging it looks like that the reason why my nginx rules don't work is how the _url() in CakeRequest.php is written. if (!empty($_SERVER['PATH_INFO'])) { return $_SERVER['PATH_INFO']; } elseif (isset($_SERVER['REQUEST_URI'])) { $uri =

Re: 2.1.x API

2012-04-25 Thread Mohammad Naghavi
Thanks, it is in book but not in api.cakephp.org but thanks for the links On Wed, Apr 25, 2012 at 3:02 PM, euromark dereurom...@googlemail.comwrote: its all in the documentation: http://book.cakephp.org/2.0/en/views.html and http://book.cakephp.org/2.0/en/views.html#view-blocks note the

Pagination

2012-04-25 Thread hill180
Trying to use the paginator in the view I have an Author who is has a Book and where the book was written ( book_id.name, city_id.name) Author sort works, title sort work, but not the sort for city_id. I can sort by the id, but obviously this won't work because the id has nothing to do with the

Re: Pagination

2012-04-25 Thread euromark
what version are you using? because in 2.x it should be the other way around: sort($key, $title) please always mention your cake version Am Donnerstag, 26. April 2012 01:29:26 UTC+2 schrieb Hill180: Trying to use the paginator in the view I have an Author who is has a Book and where the

Testing in Command line, change output error ?

2012-04-25 Thread Điển vũ
I want test a method contain line $this-Auth-user('id'); Do i must run that in browser: http://example.com/test.php and it's only way ? And a addition question. Can i change phpunit's output error warning ? It is hard to see like this: http://i.imgur.com/qNFfr.jpg -- Our newest site

Re: Pagination

2012-04-25 Thread hill180
1.3 On Wed, Apr 25, 2012 at 5:38 PM, euromark dereurom...@googlemail.comwrote: what version are you using? because in 2.x it should be the other way around: sort($key, $title) please always mention your cake version Am Donnerstag, 26. April 2012 01:29:26 UTC+2 schrieb Hill180: Trying