This topic is locked
[SOLVED]

 Search With Existing $Strwhereclause

6/12/2013 4:16:36 PM
PHPRunner General questions
T
Tempus_Erus author

Hi,
I wonder if anyone can help with this quandry.
I have a table of data (as one would expect!). This data has a flag representing 2 categores A & B. For my 'first' view I use $strWhereClause = A. The user need only to see those record with the 'flag A'.
The problem is when the user wishes to search for a particualr record, the $strWhereClause acts as the default view in the list page and 'overides' the serch criterea. I
Is there a workaround for this or what am I missing?
Any help apreciated as always.

Sergey Kornilov admin 6/13/2013

Do not use $strWhereClause for this task. Modify SQL query of this table on 'SQL Query' screen adding WHERE clause there.

P
prattster1874 6/13/2013



Do not use $strWhereClause for this task. Modify SQL query of this table on 'SQL Query' screen adding WHERE clause there.


I have a similar issue with a View, however, I want to filter on $_SESSION["Username"] so that the User only sees their records. Is it possible?

Sergey Kornilov admin 6/13/2013

prattster1874,
for this specific scenario I recommend to use Advanced security mode 'Users can see and edit their own data only'.

T
Tempus_Erus author 6/13/2013



prattster1874,
for this specific scenario I recommend to use Advanced security mode 'Users can see and edit their own data only'.


Excellent, thanks for the input Sergey.