PHQL sub query support #15307
              
                Unanswered
              
          
                  
                    
                      bahadirbirsoz
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 2 comments 2 replies
-
| 
         What was the syntax error? I believe PHQL supports anything PDO does, so subqueries should work.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| 
         So, I think PHQL does not support view-like subquery usage. I've decided to move on. The only purpose of this was to handle pagination. I've decided to run 2 separate queries instead of subquery. 
  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm in need of using sub query. I've looked for similar issues but haven't been able to find a proper answer. Does phql support sub queries?
Let me tell you the use case. I have some complex queries with left and inner joins and pagination (limit). But the pagination must work according to main entity (only limit from part). So, here's my solution in sql:
Is there a way to execute this query in phql. I've the following, but got syntax error :
So, if phql doesn't support sub query, the I can run this as raw sql query. In that case, can I cast the raw query result to complex resultset
Phalcon\Mvc\Model\Resultset\Complexobject. Well I'm sure I can somehow handle casting objects, but is there aphalconway to achieve it?Beta Was this translation helpful? Give feedback.
All reactions