Skip to Content Skip to Menu

join table profile to tags

  • popROAR
  • popROAR
  • OFFLINE
  • Posts: 11
  • Thanks: 0
  • Karma: 0
10 years 4 months ago - 10 years 4 months ago #245255 by popROAR
join table profile to tags was created by popROAR
Hello,

I have a table for a multi select of tags.
col1->user_id
col2->tag_id
for other workflow processes
I trying to figure out how to get this as a field in a profile tab that doesn't use comprofiler text col with separater to store but this join table.
I thought i could use the query field type but that only helps with the form select but not store to my join table.
I am not familiar with writing cb code.
I am ok with joomla code
and using fof for my custom views.

I need someone to start me off in the right direction here.
or Is it possible to effective search for id#s in a multiple value column with |*| ?

example
Code:
SELECT * FROM #__comprofiler WHERE FIND_IN_SET('id1', cb_multiselectfield) OR FIND_IN_SET('id2', cb_multiselectfield) OR FIND_IN_SET('id3', cb_multiselectfield);

It looks like I might only need a pointer on writing the advanced filter on a user list so it is similar to the advanced search for user management where multiselectfield include any of (SELECT id FROM #__customtbl)

Let me know if I need more clarification.
Last edit: 10 years 4 months ago by popROAR.

Please Log in or Create an account to join the conversation.

  • popROAR
  • popROAR
  • OFFLINE
  • Posts: 11
  • Thanks: 0
  • Karma: 0
10 years 4 months ago - 10 years 4 months ago #245260 by popROAR
Replied by popROAR on topic join table profile to tags
I can only get FIND_IN_SET to work with comma separation not |*|. :(

List Management -- advanced FILTER

I want a list of users where any (SELECT id FROM #__tags WHERE parent_id = ##) tag exists in the users multiselect column.
Last edit: 10 years 4 months ago by popROAR.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
10 years 4 months ago #245272 by krileon
Replied by krileon on topic join table profile to tags
FIND_IN_SET only works with comma separated values as described in MYSQL documentation below.

dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_find-in-set

You can convert it to be comma separated though using the below example.

FIND_IN_SET( 'SEARCH_VALUE', REPLACE( '|*|', ',', '[FIELD_NAME]' ) )


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum