Search Behavior WHERE question.
Is it possible to set the SQL or maybe a session to include a keyword before a search is performed?
What I am needing is for the page to show all records with a particular criteria when the user first visits. Then change if a search is performed.
We have a column in the table called 'status'. There are 3 possible values. 0, 1, 2 which represent "Available", "On Hold" and "Sold".
We need just the "Available" records to show when they first visit the page and don't do anything. But if they click the link for "Sold", then all the records marked "Sold" will show.
The search behavior is already in place and working just fine. I created a URL variable called "Status" and used echo $_GET['Status']; in the search behavior's value for comparison.
The link that triggers the "Sold" looks like this somepage.php?Status=2, and so on.
So I have tried to mess with the "Where" statement in the search behavior but with no luck. Should I be doing this in the SQL statement first?
I can provide more of my code if needed.