Convert sql to dql for the symfony querry builder

I cannot succeed alone in transforming my SQL query (which works very well) into DQL for symfony. Ideas ?

SELECT AS id, AS name, t0.slug AS slug 
activity t0 
pack_activity ON = pack_activity.activity_id 
pack_activity.pack_id = 1

For another request I succeeded, but this one I do not succeed: /

public function findLocation()
        return $this->createQueryBuilder('t')
            ->leftJoin('t.types', 'tc')
            ->where(' = 4')


Thank !

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *