Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

sql filter "contains"

  • elica
  • elica
  • OFFLINE
  • Posts: 3
  • Thanks: 1
  • Karma: 1
14 years 1 week 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 or Create an account to join the conversation.

  • elica
  • elica
  • OFFLINE
  • Posts: 3
  • Thanks: 1
  • Karma: 1
14 years 1 week 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 or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
14 years 1 week 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 or Create an account to join the conversation.

  • elica
  • elica
  • OFFLINE
  • Posts: 3
  • Thanks: 1
  • Karma: 1
14 years 1 week 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 or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
14 years 1 week 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum