Model::findCount()

2007-03-31 Thread Ronald Chaplin
This is taken from the Cake API Documentation Model::findCount ( $ *conditions* = null, > > $ *recursive* = 0 > ) > > > Returns number of rows matching given SQL condition. > > *Parameters:* > *array* $conditions SQL conditions array for findAll > *int* $recursize The number of levels deep to

Re: SQL/Query - get months with posts

2007-03-31 Thread d34db0lts
i have a similar question. i have two tables where table 'courses' hasMany 'students' and 'students' belongs to 'courses'. I want to be able to have a list of all the courses and count how many students there are (ex: english - 20 students, math - 35 students). I've been searching all over...Count

RE: logging cake errors

2007-03-31 Thread Mariano Iglesias
What error in the Session component? -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar --

Re: logging cake errors

2007-03-31 Thread Charles Schaefer
Uau! I didn't know that we can create an AppError class. Just another question: this apply in what versions of CakePHP? Because we still use the 1.1.10, because of an error in the Session component generated after the 1.1.11 version. Anyway, this will help us. AD7six, ianh an all, very thanks

Re: logging cake errors

2007-03-31 Thread ianh
II stand corrected an am always happy to learn something new - thanks chap. ianh On 31 Mar, 13:23, "AD7six" <[EMAIL PROTECTED]> wrote: > On Mar 31, 11:12 am, "AD7six" <[EMAIL PROTECTED]> wrote: > > > > > On Mar 31, 11:02 am, "ianh" <[EMAIL PROTECTED]> wrote: > > > > I don't think there is any way

Re: Selecting far relations

2007-03-31 Thread [EMAIL PROTECTED]
Well seems like the simplest solution would be to add another relationship to your schema: Invoice=[HasOne]=> Customer Customer=[HasMany]=>Invoices I would add that the invoice model should contain a reference to a customer anyway. Should it not? Regards, Cook On Mar 31, 1:53 pm, "MYRZ" <[EMAI

Re: Selecting far relations

2007-03-31 Thread Langdon Stevenson
Hi MYRZ > Say, i have multiple customers. Customers have each a number of > projects running. In each project, their are several Tickets. And some > tickets together form an Invoice. > > So you get: > > Customer=[HasMany]=>Projects=[HasMany]=>Tickets=[BelongsTo]=>Invoices > > Now, somehow i wa

Re: logging cake errors

2007-03-31 Thread AD7six
On Mar 31, 11:12 am, "AD7six" <[EMAIL PROTECTED]> wrote: > On Mar 31, 11:02 am, "ianh" <[EMAIL PROTECTED]> wrote: > > > I don't think there is any way to make Cake do detailed logs of errors > > internal to the framework. > > O contrare. Make use of the app_error class, and you can do what you >

Custom fields using Controller->paginate() in CakePHP 1.2

2007-03-31 Thread mr_lundis
Hi, The last day I've bin searching around for a solution to my problem, here on the CakePHP group, in the API and the rest of the web (at least those pages Google has indexed). But I can't find any solution to my problem. I need to be able to: A. Merge a couple of columns in the database by usi

Selecting far relations

2007-03-31 Thread MYRZ
Hi guys, Say, i have multiple customers. Customers have each a number of projects running. In each project, their are several Tickets. And some tickets together form an Invoice. So you get: Customer=[HasMany]=>Projects=[HasMany]=>Tickets=[BelongsTo]=>Invoices Now, somehow i want to get all the

Announcing forums for Cheesecake Photoblog

2007-03-31 Thread Dr. Tarique Sani
Just a small announcement for the records :) http://cheesecake-photoblog.org/forum/index.php Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org

Re: R: Unusual Internal Server Error problem

2007-03-31 Thread poncjusz
I think that I've found the problem- my controllers don't see their models... or sth like that... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googl

Re: saving HABTM posts->tags

2007-03-31 Thread davyke
Thanks [EMAIL PROTECTED] and Tarique, the probleme commes exactly from here, but i do'nt understand why we should use the model name in here. On Mar 31, 1:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Sergei, > > Have a look at this > articlehttp://rossoft.wordpress.com/2006/08/23/wor

Re: R: Unusual Internal Server Error problem

2007-03-31 Thread poncjusz
Code which I have only to check but even this one doesn't work: -- file name: banners_controller.php: --- class BannersController extends AppController { var $name = 'Banners'; var $beforeFilter = array('checkSession', 'getName', 'getCategories'); var $components = array('

Re: CakePHP on shared hosting

2007-03-31 Thread [EMAIL PROTECTED]
Hi Aldo, I haven't seen that error before in relation to shared hosting. Usually it just means that the value that foreach is trying to use (such as $data) has not been set, or is NULL. In the case above, its the line that is trying to iterate through the columns in the MySQL table to get inform

Re: saving HABTM posts->tags

2007-03-31 Thread [EMAIL PROTECTED]
Sergei, Have a look at this article http://rossoft.wordpress.com/2006/08/23/working-with-habtm-associations/ The functions in there make working with HABTM a bit easier. The trick is getting the data structure correct. Your's looks a bit wrong from what I can see. I think your tag array should

R: Unusual Internal Server Error problem

2007-03-31 Thread m.sbragi
maybe it's related with code in your controller. Post something > -Messaggio originale- > Da: cake-php@googlegroups.com > [mailto:[EMAIL PROTECTED] Per conto di poncjusz > Inviato: sabato 31 marzo 2007 9.35 > A: Cake PHP > Oggetto: Unusual Internal Server Error problem > > > Hi, > >

Re: logging cake errors

2007-03-31 Thread AD7six
On Mar 31, 11:02 am, "ianh" <[EMAIL PROTECTED]> wrote: > I don't think there is any way to make Cake do detailed logs of errors > internal to the framework. O contrare. Make use of the app_error class, and you can do what you like. If you have one and it's in the right place (or you include it

Re: logging cake errors

2007-03-31 Thread ianh
I don't think there is any way to make Cake do detailed logs of errors internal to the framework. You could put a beforeFilter action in your app_controller that detects if Cake has detected an error and does some appropriate action, or you could write your own logs component/ plugin etc. No idea

Unusual Internal Server Error problem

2007-03-31 Thread poncjusz
Hi, I've got strange problem with 'Internal Server Error'. My administration panel is working without any problem but when I upload new controller (new functionality)- this particular controller doesn't work because of 'Internal Server Error'. Do you know what could cause problem? regards Tomek