Is the table indexed correctly?

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 20 Dec 2012, at 08:50:19, byqsri <[email protected]> wrote:

> If the query is too big you can get this error :
> SQL Error: 1153: Got a packet bigger than 'max_allowed_packet' bytes
> 
> My query is :
> SELECT `User`.`id` FROM `users` AS `User` WHERE `User`.`id` NOT IN 
> (1,2,3,4,5.....
>  
> I have testing this query on my sql server and I get the previuos error if I 
> have 70000 'id' in NOT IN conditions.
> I can't modify max_allowed_packet  in my production server
> 
> I think that it isn't the best solutions 
> 
> 
> On Wednesday, 19 December 2012 18:21:06 UTC+1, byqsri wrote:
> Hi
> I'm newbie with cakephp
> I have model User, model Group and model UsersGroup ( an user can belongs to 
> many groups and a group can have many users).
> I would ask how in CakePHP can I find all users that not belong to the Group 
> group_id (where group_id is a generic int value)
> Many thanks
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> 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].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to