From where are you obtainig the parameters for the query?

If from the URL, put this at the top of the view
$paginator->options(array('url' => $this->params['pass']));

2008/6/8 igorp <[EMAIL PROTECTED]>:
>
> Thanks,
>
> it works in CR1 but not with pagination. First page is OK but the next
> is empty because the query is different:
>
> first page is OK:
> 2       SELECT COUNT(*) AS `count` FROM `elilibs` AS `Elilib` WHERE
> `Elilib`.`nazev` LIKE CONVERT( _utf8 '%74AC1%' USING ASCII)
> 3       SELECT `Elilib`.`id`, `Elilib`.`nazev`, `Elilib`.`pouzdro`,
> `Elilib`.`sirka`, `Elilib`.`vyska`, `Elilib`.`knihovna` FROM `elilibs`
> AS `Elilib` WHERE `Elilib`.`nazev` LIKE CONVERT( _utf8 '%74AC1%' USING
> ASCII) ORDER BY `Elilib`.`nazev` asc LIMIT 50
>
>
> second page:
> 2       SELECT COUNT(*) AS `count` FROM `elilibs` AS `Elilib` WHERE
> `Elilib`.`nazev` LIKE CONVERT( _utf8 '' USING ASCII)
> 3       SELECT `Elilib`.`id`, `Elilib`.`nazev`, `Elilib`.`pouzdro`,
> `Elilib`.`sirka`, `Elilib`.`vyska`, `Elilib`.`knihovna` FROM `elilibs`
> AS `Elilib` WHERE `Elilib`.`nazev` LIKE CONVERT( _utf8 '' USING ASCII)
> ORDER BY `Elilib`.`nazev` asc LIMIT 50
>
> I do know I am getting boring but I didn't find how to insert my
> condition to next pages.
>
> On 4 Čen, 20:27, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
>> > Thanks for your help, but using -! didn't help much. Cakephp wrongly
>> > inserted a = before the LIKE.
>>
>> Then if you are using a version from SVN,
>>
>> $cond=array("Elilib.nazev LIKE"=> "-! CONVERT( _utf8
>> "."'".$this->data['Elilib']['nazev']."' USING ASCII)");
>>
>> Regards,
>> - Dardo Sordi.
>>
>> > = LIKE CONVERT( _utf8 '%74%' USING ASCII)
>>
>> > Regards
>>
>> > Igor
>>
>> > Dardo Sordi Bogado wrote:
>>
>> >>> It's wrong and I don't get any data. Is it a bug in cakephp or I a am
>> >>> doing something wrong?
>>
>> >> Cake is escaping your data, prepend "-!" to the condition.
>>
>> >> $cond=array("Elilib.nazev"=> "-! LIKE CONVERT( _utf8
>> >> "."'".$this->data['Elilib']['nazev']."' USING ASCII)");
>>
>> >> HTH,
>> >> - Dardo Sordi.
>>
>> > --
>> > View this message in 
>> > context:http://www.nabble.com/LIKE-operator-with-a-function-tp17631202p176496...
>> > Sent from the CakePHP mailing list archive at Nabble.com.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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