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

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

      <tfoot id='TJlaz'></tfoot>

    1. <legend id='TJlaz'><style id='TJlaz'><dir id='TJlaz'><q id='TJlaz'></q></dir></style></legend>

      1. MySQL Zend 框架 - SQLSTATE[42000]:语法错误或访问冲突:1064

        MySQL Zend Framework - SQLSTATE[42000]: Syntax error or access violation: 1064(MySQL Zend 框架 - SQLSTATE[42000]:语法错误或访问冲突:1064)
          <bdo id='7YIPN'></bdo><ul id='7YIPN'></ul>

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

            1. <tfoot id='7YIPN'></tfoot>
            2. <small id='7YIPN'></small><noframes id='7YIPN'>

              <legend id='7YIPN'><style id='7YIPN'><dir id='7YIPN'><q id='7YIPN'></q></dir></style></legend>
                • 本文介绍了MySQL Zend 框架 - SQLSTATE[42000]:语法错误或访问冲突:1064的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在发布这个问题之前,我已经阅读了所有我可以接受的回复.虽然相似,但没有一个解决我的特定问题(或者我没有意识到他们这样做).

                  I've read every response I could fine on SO before posting this question. Although similar, none addressed my particular problem (or I didn't recognize them doing so).

                  我有一个扩展 Zend_Db_Table_Abstract 的表类.在模型中,我尝试使用 join() 方法并基于如下表 ID 返回单行:

                  I have a table class that extends Zend_Db_Table_Abstract. In the model, I'm trying to return a single row using a join() method and based on the table ID like this:

                          $getCategoryResults = $this->select();
                          $getCategoryResults->setIntegrityCheck(false)
                                             ->from(array('c'=> 'categories', '*'))
                                             ->join(array('e' => 'events'),'c.events_idEvent = e.idEvent', array())
                                              ->where("e.idEvent = ?", $idEvent);
                  

                  当我回显 sql 对象时,我得到这个:

                  when I echo the sql object, I get this:

                  SELECT `c`.* FROM `categories` AS `c` 
                  INNER JOIN `events` AS `e` ON c.events_idEvent = e.idEvent 
                  WHERE (e.idEvent = '1')
                  

                  奇怪的是,如果我使用这种格式,

                  Oddly enough, if I use this format,

                  ->where("e.idEvent = $idEvent");
                  

                  我的输出是WHERE (e.idEvent = 1)".该值未包含在刻度中,但似乎适用于 MySQL.当我在 phpMyAdmin 中运行查询时,我得到这个:

                  my output is "WHERE (e.idEvent = 1)". The value is not enclosed in ticks, but either seems to work for MySQL. When I run the query in phpMyAdmin, I get this:

                  idCategory type displayOrder description localStartTime events_idEvent
                  1 个人 1 5k 跑步/步行 2010-02-18 23:59:59 1
                  2 team 2 5k Team Category 2010-02-18 23:59:591 1

                  idCategory type displayOrder description localStartTime events_idEvent
                  1 individual 1 5k Run / Walk 2010-02-18 23:59:59 1
                  2 team 2 5k Team Category 2010-02-18 23:59:591 1

                  这是我期望看到的.但是当我在浏览器中运行我的应用程序时,我得到了这个丑陋:

                  which is what I expected to see. But when I run my app in a browser, I get this ugliness:

                  SQLSTATE[42000]:语法错误或访问冲突:1064 你的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,了解在 'SELECT c.* FROM categories AS c INNER JOIN <附近使用的正确语法code>events AS e ON c.events_id' 在第 1 行

                  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT c.* FROM categories AS c INNER JOIN events AS e ON c.events_id' at line 1

                  我已经检查了我能想到的所有资源.希望 SO 超级专家的结合使我成为最后一站.:D

                  I've checked every resource that I can think of. Hopefully, the combined awesomeness of SO uber-experts will make this my last stop. :D

                  推荐答案

                  查看错误语句的第二部分.如果 mysql 在其他地方,很可能是关于访问冲突.

                  Check out the second part of the error statement. Most likely it is regarding an access violation if the mysql elsewhere.

                  这篇关于MySQL Zend 框架 - SQLSTATE[42000]:语法错误或访问冲突:1064的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to delete duplicate records in mysql database?(如何删除mysql数据库中的重复记录?)
                  Python Pandas write to sql with NaN values(Python Pandas 使用 NaN 值写入 sql)
                  MySQL Insert amp; Joins(MySQL 插入 amp;加入)
                  MySQL concat() to create column names to be used in a query?(MySQL concat() 创建要在查询中使用的列名?)
                  NodeJS responded MySQL timezone is different when I fetch directly from MySQL(当我直接从 MySQL 获取时,NodeJS 响应 MySQL 时区不同)
                  WHERE datetime older than some time (eg. 15 minutes)(WHERE 日期时间早于某个时间(例如 15 分钟))
                • <i id='XLaj7'><tr id='XLaj7'><dt id='XLaj7'><q id='XLaj7'><span id='XLaj7'><b id='XLaj7'><form id='XLaj7'><ins id='XLaj7'></ins><ul id='XLaj7'></ul><sub id='XLaj7'></sub></form><legend id='XLaj7'></legend><bdo id='XLaj7'><pre id='XLaj7'><center id='XLaj7'></center></pre></bdo></b><th id='XLaj7'></th></span></q></dt></tr></i><div id='XLaj7'><tfoot id='XLaj7'></tfoot><dl id='XLaj7'><fieldset id='XLaj7'></fieldset></dl></div>

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

                          <tbody id='XLaj7'></tbody>
                        • <tfoot id='XLaj7'></tfoot>

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

                            <bdo id='XLaj7'></bdo><ul id='XLaj7'></ul>