This topic is locked

addwhere issue with 5.1

9/4/2009 3:13:59 PM
PHPRunner General questions
hfg author

I have encountered a problem I think is with 5.1 vs 5.0 of phpr
in my events I have
$strSQL = AddWhere($strSQL,"Entity in (".$_SESSION["ENTITYCODE"].")");
Since building my project in 5.1 I now get this:
php error happened
Technical information

Error type 256

Error description You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and (Entity in ('228'))' at line 1

URL (removed text)/PandL_list.php?

Error file (removed text)\include\dbconnection.php

Error line 34

SQL query SELECT count(*) FROM entity_pl ) and (Entity in ('228'))

Solution This is a general error. It occurs when there is an error in event code or in SQL.
Any help?

hfg author 9/10/2009

any suggestions on this? It is preventing me from moving some projects to 5.1. Do I need to alter the event code for 5.1 in some way?

Sergey Kornilov admin 9/10/2009

Post your application to Demo Account (use 'Demo Account' button on the last screen in program). Then open a ticket at http://support.xlinesoft.com sending your Demo Account URL for investigation.

hfg author 9/11/2009

I was able to get this working by changing my code to this:
$strWhereClause = WhereAdd($strWhereClause,"Entity in (".$_SESSION["ENTITYCODE"].")");