Subqueries in query builder/PHQL

I was wondering if subqueries were supported for the FROM clause in Phalcon 2.0.5. I saw that they are supported in at least the WHERE clause.

I'm trying to do something similar to :

    SELECT columnA, columnB, columnC`
    FROM (SELECT Column A, ColumnB, TableB.ColumnC`
        FROM TableA
        JOIN TableB ON TableA.TableBId = TableB.id) AS temp
    WHERE ColumnB != 1;

Is that supported, or will I have to figure something else out ?



61.1k

i think its still unavaible, but phql improvemnts should come in the near future

https://forum.phalconphp.com/discussion/2820/phalcon-subquery

Not sure why you need such a weird query? Just do normal join and normal FROM.