Skip to content

Transforming SQL into QueryBuilder #8856

Discussion options

You must be logged in to vote

Are you sure you need to use a query builder? Should any part of your SQL query become optional? If not, I would recommend against using a query builder. Here is a table to help you take that kind of decision: https://greg0ire.fr/doctrine-autrement/#/32 (:fr:)

If you actually need a query builder here, I think you might be able to achieve it with the SQL (as opposed to DQL, which I doubt you actually need here) query builder, from the DBAL package (Doctrine\DBAL\Query\QueryBuilder).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bglevon
Comment options

@greg0ire
Comment options

@bglevon
Comment options

Answer selected by greg0ire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8853 on July 23, 2021 17:45.