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 bottom
Post Reply
Post New Topic
Page: 1
TOPIC: Passing Session Variables into the "Where" column
#330
Passing Session Variables into the "Where" column 1 Year, 11 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
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
sdwek
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#335
Re:Passing Session Variables into the "Where" column 1 Year, 11 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
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
 
#386
Re:Passing Session Variables into the "Where" column 1 Year, 10 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.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
sdwek
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#414
Re:Passing Session Variables into the "Where" column 1 Year, 9 Months 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
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
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
Reply Quote
Would you trade a walk-on part in a war for the lead role in a cage?
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: tomaz
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting