izniburak / pdox

useful query builder class that works with PHP PDO class for simple access your data.
http://burakdemirtas.org/pdox-kullanisli-pdo-sinifi-php/
MIT License
299 stars 105 forks source link

How to make query with UNION [ALL] #105

Closed simp-lee closed 2 years ago

simp-lee commented 2 years ago

Thanks for your good job. But, I can't find the usage of UNION [ALL] in the document, as following:

SELECT column,... FROM table1 
UNION [ALL]
SELECT column,... FROM table2
...

Any solutions? Or how to use native SQL statements in pdox?

izniburak commented 2 years ago

Hi @lee-php , Thanks for feedback. For now, there is no a method to use union command directly. But you can type native SQL code via query method. You can check this: https://github.com/izniburak/PDOx/blob/master/DOCS.md#query

Thanks.

simp-lee commented 2 years ago

Thanks, izniburak. I will try native SQL until your improvement.