Re: Help in simple query!

2013-05-29 Thread resting
It will be helpful if you show us what you had done to produce that error. On Wednesday, 29 May 2013 04:53:39 UTC+8, gonzela2006 wrote: Hello, As you can see on the below image https://lh3.googleusercontent.com/-_Q29P1DXHlQ/UaUWfBmdtYI/AX8/CbEsouqCcCg/s1600/Presentation1.jpg I

Re: Help in simple query!

2013-05-29 Thread Dr. Drijk
Checkup for typo's can be helpfull. :) Op dinsdag 28 mei 2013 22:53:39 UTC+2 schreef gonzela2006 het volgende: Hello, As you can see on the below image https://lh3.googleusercontent.com/-_Q29P1DXHlQ/UaUWfBmdtYI/AX8/CbEsouqCcCg/s1600/Presentation1.jpg I want to display students that

Re: containable problem

2013-05-29 Thread John
The message is telling you what is wrong, you are asking containable to contain the starting Model again $users = $this-User-find('all', array( 'conditions' = $cond2 ), * array(* 'contain' = array( 'Attendance' = array( 'conditions' = $cond ),

Routes and multilanguage site

2013-05-29 Thread iFemke
Hi, We have a problem with routes and our multilanguage site. We tried different salutions, but we can't get it to work. We have set it up like this: Router::connect('/', array('controller' = 'pages', 'action' = 'display', 'home')); Router::connect('/:language', array('controller' = 'pages',

Re: containable problem

2013-05-29 Thread Robert Gravel
Hi John, This was the exact code i tried in my second example. putting the condition for the current model seems to break the containable method and then all related models are returned. also the date search within the Attendance model also breaks. There must be a way here I am not seeing. I

Re: containable problem

2013-05-29 Thread John
What are your model associations? Have you tried to break it down to one step at a time (no contained model then add one at a time) and have a look at the produced SQL? I usually blindly add a 'recursive' = -1 clause in all find options when I use containable to keep things simple (unless it

Re: containable problem

2013-05-29 Thread Robert Gravel
User has many Attendance Usermembership Bills Albums Rankforusers and more... School has many Users need to return User, Attendance, Usermembership where User is based on school_id and Attendance is based on date. Robert On Wed, May 29, 2013 at 11:35 AM, John spil...@gmail.com wrote: What

Re: containable problem

2013-05-29 Thread John
Are you sure you tried the code I proposed in my second message? If yes what is the error message or returned output like? Your first example in the first message is *different* to what I wrote. What you were doing is to *find all *users *then* use their IDs to return results from the other

Re: Hi I am new here and I need some assistance

2013-05-29 Thread Jose Antonio Amuchastegui
Hi Really thanks, I will attempt this and I will keep you informed. Too many thanks El martes, 28 de mayo de 2013 23:38:36 UTC-5, jeet bajaj escribió: Hey Jose! As you said your website is made up on CAKEPHP, then i will suggest to instead to placing the file you download from github

Re: containable problem

2013-05-29 Thread Robert Gravel
John thank you but it seems to not be working. I was mistaken that your code is the same as my second example. I have pasted your code: when I input a date range of may27 - may 29, I am returned all associated models and no filtering on the Attendance model. You can see both Attendance records

Re: containable problem

2013-05-29 Thread Robert Gravel
So embarrassing. In my long list of associations School-User was missing? Your code worked thanks a bunch.. Robert On Wed, May 29, 2013 at 3:22 PM, Robert Gravel rockb...@gmail.com wrote: John thank you but it seems to not be working. I was mistaken that your code is the same as my second

Re: containable problem

2013-05-29 Thread John
I'm glad it worked. It always helps to use 'fields' in order to keep down the returned data to only those needed. Not only it's good for the database but it also helps you check the cake produced SQL against what you expect plus make more sense on the results to see what you want instead of

Re: Help in simple query!

2013-05-29 Thread gonzela2006
Hello, I used the following code in StudentAttendances controller: $students = $this -StudentAttendance-Student- find('all', array( 'conditions' = array( 'NOT' = array('StudentAttendance.date' = array($year.'-'.$month.'-'.$day)) ), 'fields' = array('Student.id', 'Student.name'), 'order' =

Re: php cms and rewriteRule and cakephp routes

2013-05-29 Thread Mehrdad Dadkhah
thanks I use it IfModule mod_rewrite.c RewriteEngine on RewriteCond %{REQUEST_URI} !^/piwik/* RewriteRule^$ app/webroot/[L] RewriteCond %{REQUEST_URI} !^/piwik/* RewriteRule(.*) app/webroot/$1 [L] /IfModule and it's work -- Like Us on FaceBook

Re: Help in simple query!

2013-05-29 Thread resting
Have to agree with Dr. Drijk to check on typos. Is it StudentAttendances.date instead? On Thursday, 30 May 2013 07:46:53 UTC+8, gonzela2006 wrote: Hello, I used the following code in StudentAttendances controller: $students = $this -StudentAttendance-Student- find('all', array(