Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Referencing Joomla current use/group in SQL query
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Referencing Joomla current use/group in SQL query
#40292
Referencing Joomla current use/group in SQL query 11 Years, 2 Months ago Karma: 0
Hi, We have a requirement where we need to retrieve data from a table based on who is logged in and their group. Is it possible and if yes, how can we reference the Joomla userid/group in the where clause of the query that we specify when we configure the Ari Data Table. Thanks,

KI
The administrator has disabled public write access.
 
#40297
Re:Referencing Joomla current use/group in SQL query 11 Years, 2 Months ago Karma: 748
Hello,

You can use {$UserId} and {$UserGroupId} predefined variables in "WHERE" clause of "SELECT" SQL query. For example:

Code:


SELECT
 id,
 name
FROM
 #__users
WHERE
 id = {$UserId}



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1