• <i id='1mKdH'><tr id='1mKdH'><dt id='1mKdH'><q id='1mKdH'><span id='1mKdH'><b id='1mKdH'><form id='1mKdH'><ins id='1mKdH'></ins><ul id='1mKdH'></ul><sub id='1mKdH'></sub></form><legend id='1mKdH'></legend><bdo id='1mKdH'><pre id='1mKdH'><center id='1mKdH'></center></pre></bdo></b><th id='1mKdH'></th></span></q></dt></tr></i><div id='1mKdH'><tfoot id='1mKdH'></tfoot><dl id='1mKdH'><fieldset id='1mKdH'></fieldset></dl></div>

      <small id='1mKdH'></small><noframes id='1mKdH'>

      1. <tfoot id='1mKdH'></tfoot>
          <bdo id='1mKdH'></bdo><ul id='1mKdH'></ul>
        <legend id='1mKdH'><style id='1mKdH'><dir id='1mKdH'><q id='1mKdH'></q></dir></style></legend>

        错误:预期的 DoctrineORMQueryLexer::T_WITH,“ON"

        Error: Expected DoctrineORMQueryLexer::T_WITH, got #39;ON#39;(错误:预期的 DoctrineORMQueryLexer::T_WITH,“ON)
          <tbody id='nKTfF'></tbody>

            <legend id='nKTfF'><style id='nKTfF'><dir id='nKTfF'><q id='nKTfF'></q></dir></style></legend>

              <tfoot id='nKTfF'></tfoot>

              <small id='nKTfF'></small><noframes id='nKTfF'>

                <bdo id='nKTfF'></bdo><ul id='nKTfF'></ul>
                • <i id='nKTfF'><tr id='nKTfF'><dt id='nKTfF'><q id='nKTfF'><span id='nKTfF'><b id='nKTfF'><form id='nKTfF'><ins id='nKTfF'></ins><ul id='nKTfF'></ul><sub id='nKTfF'></sub></form><legend id='nKTfF'></legend><bdo id='nKTfF'><pre id='nKTfF'><center id='nKTfF'></center></pre></bdo></b><th id='nKTfF'></th></span></q></dt></tr></i><div id='nKTfF'><tfoot id='nKTfF'></tfoot><dl id='nKTfF'><fieldset id='nKTfF'></fieldset></dl></div>
                  本文介绍了错误:预期的 DoctrineORMQueryLexer::T_WITH,“ON"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我编写了以下用于从数据库中获取数据的代码:

                  I have written the following code for fetching data from database:

                  function getnotificationAction()
                  {
                      $session = $this->getRequest()->getSession();
                      $userId = $session->get('userid');
                  
                      $entitymanager = $this->getDoctrine()->getEntityManager();
                      $notification = $entitymanager->getRepository('IGCNotificationBundle:Notifications');
                      $userNotification = $entitymanager->getRepository('IGCNotificationBundle:Usernotifications');
                      $query = $entitymanager
                                   ->createQuery("SELECT n.notificationid, n.title,n.notificationmessage, u.creationdate, u.notificationid, u.messagestatus From IGCNotificationBundle:Notifications AS n JOIN IGCNotificationBundle:Usernotifications AS u ON u.notificationid = n.notificationid WHERE u.userId = :userId ORDER BY n.creationdate DESC")->setParameter('userId', userId);
                  
                      $notifications = $query->getResult();
                  
                      return $this->render('IGCNotificationBundle:Default:notification.html.twig', array('notifications' => $notifications));
                  } }
                  

                  但它正在给予:

                  [语法错误] 第 0 行,第 203 行:错误:预期的 DoctrineORMQueryLexer::T_WITH,出现ON"500 内部服务器错误 - QueryException 1 链接异常:QueryException

                  [Syntax Error] line 0, col 203: Error: Expected DoctrineORMQueryLexer::T_WITH, got 'ON' 500 Internal Server Error - QueryException 1 linked Exception: QueryException

                  推荐答案

                  [Syntax Error] line 0, col 203: Error: Expected DoctrineORMQueryLexer::T_WITH, got 'ON' 500 Internal Server Error - QueryException 1 linked Exception: QueryException 
                  

                  我认为您应该将关键字ON"替换为WITH".

                  I think you should replace your keyword 'ON' with a 'WITH' .

                  从文档中提取:

                  现在可以在 DQL 中使用任意实体之间的连接语法 FROM Foo f JOIN Bar b WITH f.id = b.id.

                  Joins between arbitrary entities are now possible in DQL by using the syntax FROM Foo f JOIN Bar b WITH f.id = b.id.

                  这篇关于错误:预期的 DoctrineORMQueryLexer::T_WITH,“ON"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Is PHP or PHP based web framework stateful or stateless?(PHP 或基于 PHP 的 Web 框架是有状态的还是无状态的?)
                  How to parse django style template tags(如何解析 django 样式模板标签)
                  What is a good setup for editing PHP in Emacs?(在 Emacs 中编辑 PHP 的好设置是什么?)
                  How to check whether specified PID is currently running without invoking ps from PHP?(如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?)
                  What#39;s the difference between escapeshellarg and escapeshellcmd?(escapeshellarg 和escapeshellcmd 有什么区别?)
                  php in background exec() function(php 后台 exec() 函数)

                • <small id='HhKiG'></small><noframes id='HhKiG'>

                    <tbody id='HhKiG'></tbody>
                • <legend id='HhKiG'><style id='HhKiG'><dir id='HhKiG'><q id='HhKiG'></q></dir></style></legend>

                      <bdo id='HhKiG'></bdo><ul id='HhKiG'></ul>
                    • <i id='HhKiG'><tr id='HhKiG'><dt id='HhKiG'><q id='HhKiG'><span id='HhKiG'><b id='HhKiG'><form id='HhKiG'><ins id='HhKiG'></ins><ul id='HhKiG'></ul><sub id='HhKiG'></sub></form><legend id='HhKiG'></legend><bdo id='HhKiG'><pre id='HhKiG'><center id='HhKiG'></center></pre></bdo></b><th id='HhKiG'></th></span></q></dt></tr></i><div id='HhKiG'><tfoot id='HhKiG'></tfoot><dl id='HhKiG'><fieldset id='HhKiG'></fieldset></dl></div>
                      <tfoot id='HhKiG'></tfoot>