Welcome, Guest
Please Login or Register.    Lost Password?

Passing Session Variables into the "Where" column
(1 viewing) (1) Guest
Welcome to the ToolsJX forum!


Go to bottomPage: 1
TOPIC: Passing Session Variables into the "Where" column
#330
Passing Session Variables into the "Where" column 5 Months ago Karma: 0
Questions slightly similar to this have been asked but I cannot seem to find an answer that fits.

In my first page, a user makes a selection from 3 categories - let's use cars since it's easy to understand.

Color
Brand
Mileage

For color there are 5 options, 10 for Brand, and 10 for Mileage. Once these are selected and the user hits submit, these are passed to the next form using session variables - I'd like to use Grid Builder to show the results.

Where can I pass session variables into the "Where" column?

Thanks,

Steve
sdwek
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#335
Re:Passing Session Variables into the "Where" column 5 Months ago Karma: 1
Hi,

in GridBuilder.php (frontend) from line 191, you can modify code for WHERE there as you wish.

Best regards,
Viljem
viljem
Admin
Posts: 145
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#386
Re:Passing Session Variables into the "Where" column 4 Months ago Karma: 0
Hi,

I posted the first message a while ago but I'd like to revisit this issue.

When you see gridbuilder.php (frontend) exactly where am I going, and what line would I be altering?

So if I want to filer Column1 on variable $Choice, where exactly would I put this in the code? (what do I replace?)

Thanks in advance, your help is greately appreciated.
sdwek
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#414
Re:Passing Session Variables into the "Where" column 3 Months, 2 Weeks ago Karma: 3
I just had to do a similar task with an assignment. The way in which i accomplished this is as follows:

line 333 is function translatewherecond

i added a new str_replace for @session

called a new instance of jsession
got the session id and passed to a variable
put a str_replace statement for @session.

now i can add the session id variable to any of the queries without having to confine all of the queries to the same session parameter.

i just added
Code:

`session` = '@session'
as the where condition and it replaced it as needed

hope this helps
djadamsikora
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Gender: Male First Merchant Funding Location: Bay Harbor Islands, FL Birthday: 04/30
The administrator has disabled public write access.
Would you trade a walk-on part in a war for the lead role in a cage?
 
Go to topPage: 1
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting