Thanks for this.... much better....I am still learning.

On Oct 26, 6:32 am, Marco <[email protected]> wrote:
> I agree with Miles.
>
> $this->paginate =
> array('conditions'=>array('Result.location'=>'Sundown'));
> $this->set('results', $this->paginate('Result'));
>
> On Oct 25, 5:38 pm, Miles J <[email protected]> wrote:
>
> > Why are you setting $results twice?
>
> > If you want pagination, use paginate(), you dont need the other query.
>
> > On Oct 25, 11:39 am, Briko03 <[email protected]> wrote:
>
> > > It looks like the first query is working as it should. I  am positive
> > > there is a location field.
>
> > > Here is a snapshot of the table
>
> > > When I run the first query it works fine and returns 2615 records.
>
> > > I think it has something to do with the pagination perhaps?
>
> > > On Oct 25, 1:50 pm, Jeremy Burns | Class Outfit
>
> > > <[email protected]> wrote:
> > > > Are you certain you have a row in your database that matches that 
> > > > criteria? The SQL looks right, but the count is zero. What happens when 
> > > > you run the SQL directly against the database?
>
> > > > Jeremy Burns
> > > > Class Outfit
>
> > > > [email protected]http://www.classoutfit.com
>
> > > > On 25 Oct 2010, at 13:46, Briko03 wrote:
>
> > > > > I have a field named location.
>
> > > > > This is what is coming throu from cake
>
> > > > > SHOW FULL COLUMNS FROM `results`           14      14      3
> > > > > 2  SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE
> > > > > COLLATION_NAME= 'utf8_general_ci';         1       1       1
> > > > > 3  SELECT `Result`.`id`, `Result`.`racenum`, `Result`.`bib`,
> > > > > `Result`.`fname`, `Result`.`lname`, `Result`.`sex`, `Result`.`class`,
> > > > > `Result`.`team`, `Result`.`firstrun`, `Result`.`secondrun`,
> > > > > `Result`.`best`, `Result`.`points`, `Result`.`season`,
> > > > > `Result`.`location` FROM `results` AS `Result` WHERE
> > > > > `Result`.`location` = 'Sundown'            2615    2615    7
> > > > > 4  SELECT COUNT(*) AS `count` FROM `results` AS `Result` WHERE 1 = 1
> > > > > 1  1       0
> > > > > 5  SELECT `Result`.`id`, `Result`.`racenum`, `Result`.`bib`,
> > > > > `Result`.`fname`, `Result`.`lname`, `Result`.`sex`, `Result`.`class`,
> > > > > `Result`.`team`, `Result`.`firstrun`, `Result`.`secondrun`,
> > > > > `Result`.`best`, `Result`.`points`, `Result`.`season`,
> > > > > `Result`.`location` FROM `results` AS `Result` WHERE 1 = 1 LIMIT 100
> > > > > 100        100     1
>
> > > > > Check out the new CakePHP Questions 
> > > > > sitehttp://cakeqs.organdhelpotherswith 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 [email protected]
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected] For more options, visit this 
> > > > > group athttp://groups.google.com/group/cake-php?hl=en

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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to