when i use treeConnector,my program like this:
render_sql(“select id ,name from users where type=1 or type=2”,“id”,“name”,“”,“parentId”);
it will show Exception .
but if I use:
render_sql(“select id ,name from users where type=1 and type=2”,“id”,“name”,“”,“parentId”);
it will ok.
why “or” with wrong but “and” ok.
my english is poor.
thanks
         
        
          
        
           
           
           
         
         
            
            
          
       
      
        
        
          when i use treeConnector,my program like this:
render_sql(“select id ,name from users where type=1 or type=2”,“id”,“name”,"",“parentId”);
it will show Exception .
but if I use:
render_sql(“select id ,name from users where type=1 and type=2”,“id”,“name”,"",“parentId”);
it will ok.
why “or” with wrong but “and” ok.
my english is poor.
thanks
         
        
        
           
           
           
         
         
            
            
          
       
      
        
        
          Can you provide exact text of the exception ( also enable logging and provide text of the log for problematic operation )
Locally SQL test with OR instruction work as good as any other SQL
         
        
        
           
           
           
         
         
            
            
          
       
      
        
        
          The problem can be caused by the next
When you are using OR it affects all other SQL after it , which can cause infinite loops.
Fix for connectors will be available on monday.
         
        
        
           
           
           
         
         
            
            
          
       
      
        
        
          thanks for you help,and how to do it.
         
        
        
           
           
           
         
         
            
            
          
       
      
        
        
          Try to update the existing php file in connectors folder with the attached one.
( it is purposed for connectors 1.x )
db_common.zip (6.28 KB)
         
        
        
           
           
           
         
         
            
            
          
       
      
        
        
          Also, changing code as
render_sql("select id ,name from users where ( type=1 or type=2 )"
will help as well