sql filter "contains"

13 years 4 months ago #148446 by elica
sql filter "contains" was created by elica
Hi.

I've generated a multiple check box field for my users to choose several options.

Now I'd like to create a list that posts all the users that have klicked a special option (and eventually some others as well).

As it's not possible to do this with one of the standard filter options such as "equal to", I wanted to solve the problem by writing an sql query using "contains". As I don't really know how to write sql, I did some research on the internet but with not the success I was looking for.

Maybe someone of you could help me?

By the way: the name of the check box field is `cb_gebiet2`.

Thanks a lot for your answer and please excuse my english ;-)

Please Log in to join the conversation.

13 years 4 months ago #148492 by elica
Replied by elica on topic Re:sql filter "contains"
Hey guys.

As I actually didn't have time to wait for a response, I was doing further research on google. And after hours and hours of searching without finding I was lucky:

The solution to my problem was not CONTAIN but MATCH

MATCH(`cb_gebiet2`) AGAINST('Dielsdorf' IN BOOLEAN MODE)


Maybe this post will once help some other desperate people ;-)

@administrator: thanks for closing this thread.

Post edited by: elica, at: 2010/12/13 19:29
The following user(s) said Thank You: reallyoriginalusername

Please Log in to join the conversation.

13 years 4 months ago #148506 by nant
Replied by nant on topic Re:sql filter "contains"
Thanks for sharing your solution - this way others that search can find it.

You also have other alternatives which are available - guess your searching was not successful.

I see for example this thread that addresses similar needs:

www.joomlapolis.com/component/option,com_joomlaboard/Itemid,/func,view/catid,100/id,129568/#129568

Please Log in to join the conversation.

13 years 4 months ago #148564 by elica
Replied by elica on topic Re:sql filter "contains"
I thought about such a solution as well. But it's only manageble if you don't have too many entries in your multiple check box field. I unfortunately do have to many ;-)

Please Log in to join the conversation.

13 years 4 months ago #148580 by nant
Replied by nant on topic Re:sql filter
elica wrote:

I thought about such a solution as well. But it's only manageble if you don't have too many entries in your multiple check box field. I unfortunately do have to many ;-)


agree - your approach is much more elegant - thanks again for sharing.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.184 seconds

Facebook Twitter LinkedIn