Questions tagged [dql]

Doctrine Query Language (DQL) is an Object Query Language created for helping users in complex object retrieval.

Summary

DQL stands for Doctrine Query Language and is an Object Query Language derivate that is very similar to the Hibernate Query Language (HQL) or the Java Persistence Query Language (JPQL).

In essence, DQL provides powerful querying capabilities over your object model. Imagine all your objects lying around in some storage (like an object database). When writing DQL queries, think about querying that storage to pick a certain subset of your objects.

Questions

  • How to write DQL statements to achieve a particular SQL statement?
  • Why will a DQL statement not work as expected?

More Information

To learn more about DQL visit

Doctrine 1.2
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/dql-doctrine-query-language/en#dql-doctrine-query-language

Doctrine 2.0
http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html

1296 questions
-2
votes
1 answer

A form can only be submitted once 500 Internal Server Error - AlreadySubmittedException

I am trying to create a login/registration form using FOSUserBundle. After logging in the user gets a homepage. wherein he has to choose two different events for 2 time slots from two radio button type options and hit submit. Also if a user has…
utkarsh2k2
  • 1,046
  • 3
  • 19
  • 42
-2
votes
2 answers

CONCAT to concat two $_GET function

*i have written insert code in doctrine like this $social = new Entities\SocialKeyword; $social->setEventId($_GET["eventId"]); $social->setHashtag($_GET["hashtag"]); $this->em->persist($social); …
Sunil Chhimpa
  • 404
  • 1
  • 4
  • 12
-2
votes
1 answer

How to set loop on query result and then pass to twig file?

I want to add for loop for populating data in variables in php.So i get rows of query result.how to apply loop and get number of rows of query result in dql? Here is my code: public function invoicepreviewAction(){ …
Muhammad Arif
  • 1,014
  • 3
  • 22
  • 56
-3
votes
1 answer

Convert from SQL to DQL

Can you please convert it to DQL : SELECT molecule.cas, molecule.id_molecule, molecule.statutvlep8h, statutvlepct, vlep8h_mg, vlepct_mg,molecule.unitevlep, prelevement.id_laboratoire FROM thym_dev.molecule INNER JOIN thym_dev.prelevement…
Joe
  • 27
  • 3
-3
votes
1 answer

Convert Sql to Dql

I need to convert this sql line to Dql. SELECT * FROM agent JOIN maison ON agent.id = maison.id_agent WHERE maison.id = 2
Nacer Naciri
  • 67
  • 2
  • 8
-4
votes
2 answers

Convert sql to dql symfony

I would like to convert this request in sql to dql , need a little help. SELECT *, COUNT(*) AS nb_files FROM palettes JOIN files_palettes ON palettes.id = files_palettes.palettes_id GROUP BY files_palettes.palettes_id ORDER BY nb_files…
bjd
  • 9
  • 1
1 2 3
86
87