dql
Get random records with Doctrine
I wonder how to get a random number of Members from a Group, but I do not know what is the best way to do this, and I think ORDER BY RAND() is not the best alternative, as a Group can have more than 1[详细]
2023-04-05 18:37 分类:问答How can I write a DQL for these entities?
I have entities 开发者_如何学Goseen as DB screenshot: You can see the screenshot here-> http://imageshack.us/photo/my-images/830/asdsasda.jpg/[详细]
2023-04-04 18:14 分类:问答CASTING attributes for Ordering on a Doctrine2 DQL Query
I am trying to get Doctrine2 Entities, ordered by their ID which apparently is a String even though it contains only Numbers.[详细]
2023-04-04 09:44 分类:问答Limit amount of records retrieved when using Doctrine DQL in Symfony2
I have the following query: $latestcontent = $em->createQuery(\' SELECT c.title, c.content, c.lastedit开发者_开发知识库, a.firstname, a.surname[详细]
2023-04-04 09:04 分类:问答How to update sfUserProfile after the completion of a separate module? postSave() not working
I have a registration form that includes sfRegistration and sfProfile, which after completion, get\'s redirected to another form - to determine the user\'s corporation and is a seperate module.The sfP[详细]
2023-04-02 07:25 分类:问答How to hydrate an Entity to its object when ordering when a specific computed field?
I need to get the diff from some integer, I\'ve a column \'number\' with value like 1 and -1, then I want to use SUM() to compute the difference.[详细]
2023-04-01 00:51 分类:问答Symfony 1.4: How to limit results of the index action to only those of the logged in user
I apologize in advance for this newb question, but I\'ve been struggling with the proper way to go about getting the correct result.[详细]
2023-03-30 12:06 分类:问答How to return object from a DQL query?
I have written a DQL query in Doctrine 2: $qb->select(\'r.position\') ->from(\'\\Entities\\Races\', \'r\')[详细]
2023-03-28 16:55 分类:问答How to build a query involving several different tables with different relationships
I\'m currently trying to write a query which involves 5 main tables, 2 of which are referring to a 3rd with foreign keys, but not relating to each-other... and one of the first 2 tables is the main su[详细]
2023-03-28 08:52 分类:问答Escaping backslash in namespaces with DQL (Doctrine 2)
I\'m a bit confused about writing queries in DQL. From the official documentation: $query = $em->createQuery(\'SELECT u FROM MyProject\\Model\\User u WHERE u.age > 20\');[详细]
2023-03-28 08:15 分类:问答