This topic is locked
[SOLVED]

 $strWhereClause - Replacing or Adding?

11/17/2013 10:29:33 AM
PHPRunner General questions
S
sgchan author

Under "List Page: Before SQL Query"... Referring to the $strWhereClause, is this REPLACING the where clause or ADDING to the where clause?

C
cgphp 11/17/2013

If you want to preserve the existing where clause, use the following statement:

$strWhereClause = whereAdd($strWhereClause, " your_field_name = 'your_custom_value' ");


Replace your_field_name and your_custom_value with the real name of the field and the real value of the field.

S
sgchan author 11/17/2013



If you want to preserve the existing where clause, use the following statement:

$strWhereClause = whereAdd($strWhereClause, " your_field_name = 'your_custom_value' ");


Replace your_field_name and your_custom_value with the real name of the field and the real value of the field.


Thanks for the prompt response. So I gather that it is designed to REPLACE?

C
cgphp 11/17/2013

Just tested and I can say $strWhereClause works well without whereAdd. The where clause is preserved in any case.