Support

  1. jimbo
  2. Support
  3. Wednesday, August 12 2015, 08:21 AM
Hi,

I'm trying to display a user list of profiles in the same company. I have so far;

company_name IN (SELECT company_name FROM #__jsn_users WHERE company_name='My Company Name')

This works but I want it to be dynamic so I need to swap 'My Company Name' for [company_name of user] (I think) but I'm unsure how to do that..

Any help would be much appreciated. Thanks.
Accepted Answer
admin Accepted Answer
Admin
try with this:
company_name LIKE "{user company_name displayedOrMe}" AND company_name IS NOT NULL AND company_name<>''


NOTE: in some version of MySQL you need to use
!=
instead
<>
  1. more than a month ago
  2. Support
  3. # Permalink
jimbo Accepted Answer
Basic
Perfect. Thank you very much.
  1. more than a month ago
  2. Support
  3. # 1
jimbo Accepted Answer
Basic
Hi,

thank you for your reply.

Your example worked well for the logged in user. I wanted to make it work for the displayed profile, which I think this does;

company_name LIKE "{user company_name displayedOrMe}"

but it has thrown up an unexpected bug of listing users with NULL company names. I can fix by making the company name mandatory but I don't want to do this so I think I may have to edit the mod_jsnusers/default.php file.

Many thanks.
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
our content plugin is triggered also in SQL custom Where, so you can use something like this
company_name LIKE "{user company_name}"


if company name is select,radio or checkbox you need to use {user company_name raw}, because you need to search by Database values

here docs of our content plugin: https://www.easy-profile.com/docs/26-plugin-content.html
  1. more than a month ago
  2. Support
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Online

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.