https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


Passing Session Variables into the "Where" column

More
14 years 9 months ago #330

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

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #335

Hi,

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

Best regards,
Viljem

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #386

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.

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #414

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

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

hope this helps

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.165 seconds

Contact Us

Contact us on Discord

Contact us on Facebook