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


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 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.


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?

Use $SESSION instead of $REQUEST variables
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Use $SESSION instead of $REQUEST variables
#56238
Use $SESSION instead of $REQUEST variables 9 Years ago Karma: 0
Hi,

I am currently using $REQUEST variables to pass parameters that the ARI DataTables module is catching and using in its' SQL statement. This works fine but the URL length is becoming a concern. I want to attempt to modify the site pages to use $SESSION variables stored directly on the server instead.

Please see the thread in the link below to see how I am currently using $REQUEST variables passed through the URL,

www.ari-soft.com/ARI-Data-Tables/53660-Strange-Problem-Returning-Specific-MySQL-Results.html

Can $SESSION variable values be called and used in the SQL statements within the ARI DataTables modules? If so, can you provide a simple example? Using $SESSION variables instead will enable me to remove all URL parameters and shorten the URLs.

Please note, this question relates only to using $SESSION variables instead of the $REQUEST variables ONLY in the WHERE statement of the SQL statement, not anywhere else.

Thanks in advance.

Ken
Last Edit: 2015/11/12 01:00 By kefford.
The administrator has disabled public write access.
 
#56240
Re:Use $SESSION instead of $REQUEST variables 9 Years ago Karma: 760
Hello,

Upgrade the module to v. 1.15.4. It supports ability to use session variables in SQL queries. The sample query where "article_id" session variable is used:

Code:


SELECT
 id,
 title
FROM
 #__content
WHERE
 id = {$SESSION:article_id|empty:''}



Regards,
ARI Soft
The administrator has disabled public write access.
 
#56243
Re:Use $SESSION instead of $REQUEST variables 9 Years ago Karma: 0
Excellent, thank you. I will test it following your example.

Ken
The administrator has disabled public write access.
 
#58633
Re:Use $SESSION instead of $REQUEST variables 8 Years, 2 Months ago Karma: 0
Hi,

I tried changing to $SESSION variables but without results. The query does not return data.

I was using $REQUEST variables passed through the URL string, as follows, and this works perfectly,

SELECT
LocRegion as Region,
COUNT(DISTINCT uSimID) AS Count
FROM Simulators
WHERE
MarkForDeletion <> "1"
AND
({$REQUEST:vOrganization|empty:""} = '' OR Organization LIKE CONCAT('%',{$REQUEST:vOrganization|empty:""},'%'))
AND
({$REQUEST:vTrainingNetwork|empty:""} = '' OR TrainingNetwork LIKE CONCAT({$REQUEST:vTrainingNetwork|empty:""},'%'))
GROUP BY
LocRegion
ORDER BY
Count DESC

When I changed to $SESSION variables, as follows, the query does not return any data,

SELECT
LocRegion as Region,
COUNT(DISTINCT uSimID) AS Count
FROM Simulators
WHERE
MarkForDeletion <> "1"
AND
({$SESSION:vOrganization|empty:""} = '' OR Organization LIKE CONCAT('%',{$SESSION:vOrganization|empty:""},'%'))
AND
({$SESSION:vTrainingNetwork|empty:""} = '' OR TrainingNetwork LIKE CONCAT({$SESSION:vTrainingNetwork|empty:""},'%'))
GROUP BY
LocRegion
ORDER BY
Count DESC

Also, I have confirmed that the $SESSION variables are set and being read properly because on the same form and article I re-load the data from those same $SESSION variables.

Am I missing something? Do I have to include a session_start() call? If so, where?

Ken
The administrator has disabled public write access.
 
#58634
Re:Use $SESSION instead of $REQUEST variables 8 Years, 2 Months ago Karma: 760
Hello,

Could you provide a link to a page where use the module and a temporary access to your J! backend by email?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58635
Re:Use $SESSION instead of $REQUEST variables 8 Years, 2 Months ago Karma: 0
How should I send the details? I do not want the login details posted on a forum. Is there a secure way to send?
The administrator has disabled public write access.
 
Go to topPage: 123