Forums

Where statement but kinda leave unneeded results out

illipasi 18 Feb, 2015
Hi, i have looked and tested this faq: http://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html

I want to show user group id (name of course) in form where user can select right one.

If we just leave all irrelevant group ids out of the results. In future there will be added more group.id where to select, so using this would solve form manual update problem.

User cant select admin, super user etc group id.

Any suggestions?

I have long return array OR version but it is that manual update what i dont want😀

Br, Pasi
GreyHead 18 Feb, 2015
Hi Pasi,

I think that NOT LIKE ('aa', 'cc', 'ff') would do that.

Bob
illipasi 20 Apr, 2015
Thanks Bob!

Unfortunately i didnt get it work. Im not a coder so i dont know how to use NOT LIKE in code.

Thanks anyway.
GreyHead 20 Apr, 2015
Hi Pasi,

I think it woold be like this[code<?php
return array (":model.group_id = NOT LIKE ('7', '22', '33')");
?>[/code]
Bob
This topic is locked and no more replies can be posted.