This topic is locked
[SOLVED]

Delete record if field is empy on

1/20/2012 8:27:53 AM
PHPRunner General questions
T
technoserv author

Hi every body.

i use phprunner 5.3
With function check if exist, before deleting, i insert records from a table1 to table2.
I'd like, when i display the records of table2, before displaing, to delete one or more records that has some fields =0 or NULL.
What is the correct syntax.
Thanx in advance.

C
cgphp 1/20/2012

In the "Before process" event of table2, enter this code:

global $strTableName;

db_exec("DELETE FROM ".$strTableName." WHERE some_field = 0 OR some_field IS NULL",$conn);