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

  1. <tfoot id='qWQFL'></tfoot>
      <bdo id='qWQFL'></bdo><ul id='qWQFL'></ul>
  2. <small id='qWQFL'></small><noframes id='qWQFL'>

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

      如何调试 MySQL/Doctrine2 查询?

      How to debug MySQL/Doctrine2 Queries?(如何调试 MySQL/Doctrine2 查询?)

        <bdo id='PGIvf'></bdo><ul id='PGIvf'></ul>
        <tfoot id='PGIvf'></tfoot>

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

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

                <tbody id='PGIvf'></tbody>

              • 本文介绍了如何调试 MySQL/Doctrine2 查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 MySQL 和 Zend Framework &Doctrine 2.我想即使你不使用Doctrine 2,你也会熟悉像

                I am using MySQL with Zend Framework & Doctrine 2. I think even if you don't use Doctrine 2, you will be familiar with errors like

                SQLSTATE[42000]:语法错误或访问冲突:1064 你的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以获取在第 1 行的ASC"附近使用的正确语法

                问题是我没有看到完整的查询.如果没有 ORM 框架,我可能很容易回显 sql,但是有了框架,我怎么能找出它试图执行的 SQL?我将错误缩小到

                The problem is that I don't see the full query. Without an ORM framework, I could probably echo the sql easily, but with a framework, how can I find out what SQL its trying to execute? I narrowed the error down to

                $progress = $task->getProgress();
                

                $progress 已声明

                // ApplicationModelsTask
                /**
                 * @OneToMany(targetEntity="TaskProgress", mappedBy="task")
                 * @OrderBy({"seq" = "ASC"})
                 */
                protected $progress;
                

                在 MySQL 中,任务类看起来像

                In MySQL, the task class looks like

                CREATE TABLE `tasks` (
                  `id` int(11) NOT NULL AUTO_INCREMENT,
                  `owner_id` int(11) DEFAULT NULL,
                  `assigned_id` int(11) DEFAULT NULL,
                  `list_id` int(11) DEFAULT NULL,
                  `name` varchar(60) NOT NULL,
                  `seq` int(11) DEFAULT NULL,
                  PRIMARY KEY (`id`),
                  KEY `tasks_owner_id_idx` (`owner_id`),
                  KEY `tasks_assigned_id_idx` (`assigned_id`),
                  KEY `tasks_list_id_idx` (`list_id`),
                  CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`),
                  CONSTRAINT `tasks_ibfk_2` FOREIGN KEY (`assigned_id`) REFERENCES `users` (`id`),
                  CONSTRAINT `tasks_ibfk_3` FOREIGN KEY (`list_id`) REFERENCES `lists` (`id`)
                ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1$$
                

                推荐答案

                如何使用 mysql 一般查询日志?

                一般查询日志是对mysqld正在做什么的一般记录.当客户端连接或断开连接时,服务器将信息写入此日志,并记录从客户端收到的每个 SQL 语句.当您怀疑客户端有错误并想确切知道客户端发送给 mysqld 的内容时,通用查询日志会非常有用.

                The general query log is a general record of what mysqld is doing. The server writes information to this log when clients connect or disconnect, and it logs each SQL statement received from clients. The general query log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld.

                这篇关于如何调试 MySQL/Doctrine2 查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                Zend_Controller_Router_Exception: quot;xyzquot; is not specified(Zend_Controller_Router_Exception:“xyz;未指定)
                Zend_Db_Table subquery(Zend_Db_Table 子查询)
                pcntl_fork and the MySQL connection is gone(pcntl_fork 和 MySQL 连接消失了)
                Change layout in the controller of Zend Framework 2.0(在 Zend Framework 2.0 的控制器中更改布局)
                Zend Mail Gmail SMTP(Zend 邮件 Gmail SMTP)
                Zend_Form: how to check 2 fields are identical(Zend_Form:如何检查 2 个字段是否相同)

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

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

                      <bdo id='la4Lp'></bdo><ul id='la4Lp'></ul>
                        <tbody id='la4Lp'></tbody>

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