https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× This is the optional Forum header for the Suggestion Box.

Additional expression..

  • alex113528
  • alex113528's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 4 months ago #658

Hello,

Is it possible to define some others expression than :
'@article_id'
'@category_id'
'@section_id'
'@user_id'
'@group_id'

To create custom condition ?

Actually I need to create a condition based on a field manually added to the Joomla's users table.

This ID is different for every users as the user_id is, in my case it is an internal customer ID.



In example :
Aditional Condition:
WHERE ERP_INTERNAL_ID = '@erp_id'


Congratulations for this excellent extension and thank in advance !!!

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

More
14 years 4 months ago #664

Hi,

where are you going to get @erp_id?

If you have added the field in jos_users table, then you have one sort of mapping between id of joomla users and your erp system.

All you need to create is sql view:

e.g.:

CREATE VIEW Something AS
SELECT id, ERP_INTERNAL_ID, name
FROM jos_users

and create in WHERE section:
WHERE
id = @user_id

When someone enters registered area, you can display only his/her erp_internal_id and name to him/her.

Or you need something else?

Best regards,
Viljem

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

More
13 years 11 months ago #908

First of all I just want to thank the developing team for this truly amazing extension. Two thumps up!

Im struggling with the same problem.

in the jos_users table I have a field "idcor"
I need to use a where expression according to this field of the logged in user in order to show data only related to this variable/ logged in user.

I however only have a basic understanding of SQL and I dont quite understand the explanation given in this thread.

If possible, please expand the explanation a bit?

Thank you very much

Last edit: 13 years 11 months ago by negate.

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

More
13 years 11 months ago #912

If I got you right, you added a new column to table jos_users.
If you are displaying the same table the sintax would be:

WHERE id = @user_id AND idcor = yourvalue

But I am afraid you were not specific enough for me to give you the correct answer. Which which table do you want to display and how is the data in this table connected to the users?

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

Moderators: tomaz
Time to create page: 0.143 seconds

Contact Us

Contact us on Discord

Contact us on Facebook