[Vtigercrm-developers] server api vtws query parenthesis?

Alan Lord alanslists at gmail.com
Mon Apr 6 09:18:56 GMT 2020


I need to use vtws_query but when I include parenthesis like this I get 
an error:

         $query = "SELECT id, name, status, assigned_user_id
                   FROM LSModule
                   WHERE (status = 'Active' OR status = 'Development')
                   AND tgt_module = '".$moduleName."';";



> Mon Apr  6 09:08:59 2020,529 [28641] DEBUG VT - Syntax Error on line 1: token '(' Unexpected PARENOPEN((), expected one of: COLUMNNAME

If I remove the parenthesis the query runs but I am not then sure if the 
result as actually what I want, e.g. how are the OR and AND clauses 
interpreted?

Cheers

Al



More information about the vtigercrm-developers mailing list