Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 638097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:41:44+00:00 2026-05-13T20:41:44+00:00

It looks like a big mess,how does it work as reference? http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctrine-query-language%3Abnf

  • 0

It looks like a big mess,how does it work as reference?

http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctrine-query-language%3Abnf

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:41:44+00:00Added an answer on May 13, 2026 at 8:41 pm

    I don’t think it’s used as a reference by any human-being, actually ; but it might be useful if someone want to use some automatic tool that understands BNF ; for instance, some kind of code generator.

    The advantage of BNF being that’s it’s a formal way to describe a language — much more easier to understand than english, when you are a program.

    For reference :

    • BNF = Backus–Naur Form
    • Software using BNF


    Edit after the comments : Here’s a quick example about the DQL / Object stuff :

    Let’s consider this portion of code, which is using the object-oriented API to write a query, execute it, and get the results (hydrated as arrays — prints out only the data, this way, when debugging) :

    $result = Doctrine_Query::create()
        ->select('p.id, p.title, u.login')
                ->from('Ab_Model_Post p')
                ->innerJoin('p.User u')
                ->where('p.codeStatus = ?')
                ->orderBy('p.date desc')
                ->limit(2)
                ->execute(array('OK'), Doctrine::HYDRATE_ARRAY);
    var_dump($result);
    

    And here’s the kind of output you’ll get :

    array
      0 => 
        array
          'id' => string '7' (length=1)
          'title' => string 'Septième post' (length=14)
          'User' => 
            array
              'id' => string '1' (length=1)
              'login' => string 'user1' (length=5)
      1 => 
        array
          'id' => string '6' (length=1)
          'title' => string 'Sixième post (draft=7)' (length=23)
          'User' => 
            array
              'id' => string '1' (length=1)
              'login' => string 'user1' (length=5)
    

    Of course, this is considering the schema and models classes are OK — and sorry for the example in french, I used a schema/model/database I set up some time ago for a demonstration of Doctrine, which was in french.

    Basically, the DB is for a blogging application, and, here, we :

    • get some data from posts and the user who posted them
    • for valid posts
    • the most recents posts
    • only two posts

    Now, here’s an equivalent, using what I meant by “DQL” as in “pseudo-SQL language” :

    $result = Doctrine_Query::create()
        ->query(<<<DQL
    select p.id, p.title, u.login
    from Ab_Model_Post as p, 
        p.User u
    where p.codeStatus = ?
    order by p.date desc
    limit 2
    DQL
        , array('OK'), Doctrine::HYDRATE_ARRAY);
    var_dump($result);
    

    No object-oriented API here (well, to write the query, I mean) : I only wrote that pseudo-SQL I was thinking about — which is what the BNF describes, as far as I can tell.

    And, of course, the output of the var_dump is exactly the same as the one I got before.

    I hope this makes things a bit more clear 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looks like the options are Propel, Doctrine, and ActiveRecord, others?, but I am only
Update Looks like Jon Skeet was right (big surprise!) and the issue was with
I have a Ruby script that looks like: def big_function puts starting... #does stuff
I have a big HTML file that has lots of markup that looks like
The XML I am reading looks like this: <show id=8511> <name>The Big Bang Theory</name>
I have a big problem. I created a WCF service.My POST declaration looks like
I have a table that looks something like this: word big expensive smart fast
I have a big xml document that looks like this: <Node name=foo> <Node name=16764764625>
I just started using Magento, and to me, it seems like a big mess
I've a big file with lines that look like 2 No route to specified

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.