This topic is locked

Difference between "$strWhereClause" and "whereAdd"

6/5/2016 8:25:23 AM
PHPRunner General questions
T
taumic author

Hello,
can someone please explain me the difference between the examples below:
(1)

$strWhereClause = "kdnnr <> '63808'" ;


(2)

$where = "kdnnr <> '63808'" ;

$strWhereClause = whereAdd ($strWhereClause, $where);


The reason of my question is, that with version (1) I get a wrong SQL-Query - but with version (2) it works?!
Thank you for your time
Michael

Sergey Kornilov admin 6/6/2016

Neither one is a correct approach in fact.
Here is the article that explains where and how you should be doing this:

http://xlinesoft.com/phprunner/docs/modify_sql_query_on_the_fly.htm