dql Questions

1

Solved

The symfony framework features an app/console file that can be executed via php to perform some maintenance tasks. It allows users to run DQL queries as well: # php app/console doctrine:query:dql ...
Wattenberg asked 27/2, 2012 at 12:52

1

Solved

This may seem like a rudimentary request, but I can't seem to get it to work, so I'm either missing something stupid, or am not understanding how it should be done. Thanks in advance. I have two d...
Naima asked 21/1, 2012 at 5:45

3

Solved

So far, I think doctrine doesn't have a way of selecting a random row. So I am thinking I have a query to get the count of rows // pseudo code $count = SELECT COUNT(i) FROM Item i WHERE ... Then...
Gotama asked 22/12, 2011 at 8:49

1

I have 2 entity: /** * @ORM\Entity * @ORM\Table(name="users") */ class User { /** * @ORM\ManyToMany(targetEntity="Myapp\UserBundle\Entity\Group") * @ORM\JoinTable(name="user_groups", * join...
Moisture asked 16/12, 2011 at 13:40

1

Solved

I´m working with Symfony2 and I need to execute this SQL for example: select detformacion.* from detformacion left join formacion on detformacion.formacion_id = formacion.id left join detcurs...
Deconsecrate asked 26/10, 2011 at 9:24

1

Solved

I have the following query: $latestcontent = $em->createQuery(' SELECT c.title, c.content, c.lastedit, a.firstname, a.surname FROM ShoutMainBundle:Content c, ShoutMainBundle:Admin a WHERE c...
Hephzipa asked 13/9, 2011 at 15:5

2

In the Doctrine manual, under Constrain relationships as much as possible, it gives the advice "Eliminate nonessential associations" and "avoid bidirectional associations if possible". I don't unde...

1

Solved

How can i set a condition, in a where clause of Doctrine 1.2 ORM to specify Greater than date in DQL example Doctrine_Query::create() ->from('user u') ->where(?) ->execute(); Thanks ...
Kale asked 14/7, 2011 at 23:4

2

Solved

I have a MySQL command and I cannot find the equivalent in DQL. I am trying to fetch the list most commented posts. Here is the MySQL command : SELECT posts.id, COUNT(comments.id) AS num FROM post...
Mentality asked 13/6, 2011 at 3:4

1

Solved

i noticed that if i try to do soemthing like $query = $em->createQuery('SELECT u FROM \Application\Entities\User u'); i get [Semantical Error] line 0, col 14 near '\Application\Entities\...
Pitchdark asked 25/7, 2010 at 3:8

2

Solved

I've got 2 tables in an MySQL DB, im using doctrine 1.2 and symfony 1.4.4 Installedbase and Spare Installedbase: ib_id app_id location and Spare: spare_id app_id amount Now i want to join th...
Aluminize asked 4/6, 2010 at 7:53

3

Solved

here we got a positional parameter: SELECT u FROM ForumUser u WHERE u.id = ?1 and here a named parameter: SELECT u FROM ForumUser u WHERE u.username = :name this is DQL (doctrine query ...
Swenson asked 20/4, 2010 at 19:55

© 2022 - 2024 — McMap. All rights reserved.