Welcome, Guest
Please Login or Register.    Lost Password?

Additional expression..
(1 viewing) (1) Guest
This is the optional Forum header for the Suggestion Box.
Go to bottom
Post Reply
Post New Topic
Page: 1
TOPIC: Additional expression..
#658
Additional expression.. 1 Year, 6 Months ago Karma: 0
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 !!!
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
alex113528
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#664
Re:Additional expression.. 1 Year, 6 Months ago Karma: 1
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.:
Code:

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



and create in WHERE section:
WHERE
Code:

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
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
viljem
Admin
Posts: 181
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#908
Re:Additional expression.. 1 Year, 1 Month ago Karma: 0
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
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
negate
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/12/12 08:12 By negate.
Reply Quote
 
#912
Re:Additional expression.. 1 Year, 1 Month ago Karma: 5
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:

Code:

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?
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
tomaz
Moderator
Posts: 282
graph
User Offline Click here to see the profile of this user
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: tomaz
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting