This topic is locked

Hide row List Page

12/11/2015 4:08:32 AM
PHPRunner General questions
M
macskafogo author

Hi !

I would like to hide the row in the List Page where field is empty.

How ?
Please help me.
Sorry for my English.

romaldus 12/11/2015

In List Page: Before SQL Query:

$strWhereClause = whereAdd($strWhereClause, "YOUR_FIELD !=''");



Where YOUR_FIELD is your actual field name
Or, the easiest way to do ths is in PHPRUNNER sql query:

SELECT

FIELD1,

FIELD2,

FIELD3,

FIELD4,

FIELD5

FROM YOUR_TABLE WHERE FIELD5 !=''
Sergey Kornilov admin 12/11/2015

The approach that romaldus suggests is the best one.
Just in case here is another option, you can use 'Before Record Processed' event to hide some rows based on certain condifitions

http://xlinesoft.com/phprunner/docs/before_record_processed.htm
i.e.

if ($data["FIELD1"]=="")

return false;