Back
sqlWhere
Programming
sqlWhere
Allows you to modify SQL where clause without modifying sql property
Default:
If you set the following properties

  $lens->sqlWhere = "name='Lee'";
  $lens->sql = "select * from people where age > 30 or sex='F'";

this will rewrite the sql to

  select * from people where (age > 30 or sex='F') and name = 'Lee'

This property is useful for rewriting sql.

NOTE: Since 3.2, this property has to be reset on every page request, as it is not retained in any session variable. Formerly it was saved by phpLens.

 Basic:Yes  Advanced/Enterprise:Yes  DynamicEdit:Yes   [Version 1.0]