久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='rnK8j'></bdo><ul id='rnK8j'></ul>
  • <legend id='rnK8j'><style id='rnK8j'><dir id='rnK8j'><q id='rnK8j'></q></dir></style></legend>

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

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

      1. <tfoot id='rnK8j'></tfoot>

      2. PHP PDO 語法錯誤或訪問沖突:插入時為 1064

        PHP PDO Syntax error or access violation: 1064 on insert(PHP PDO 語法錯誤或訪問沖突:插入時為 1064)

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

        <legend id='sxf6y'><style id='sxf6y'><dir id='sxf6y'><q id='sxf6y'></q></dir></style></legend>
          <tbody id='sxf6y'></tbody>
        • <bdo id='sxf6y'></bdo><ul id='sxf6y'></ul>

          1. <tfoot id='sxf6y'></tfoot>

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

                  本文介紹了PHP PDO 語法錯誤或訪問沖突:插入時為 1064的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個表名板,我正在嘗試使用當前代碼插入數據

                  I have a table name boards, and I'm trying to insert data using the current code

                  function createBoard( $name, $desc  ) {
                      try {
                          $sth = $this->getLink()->prepare( "INSERT INTO boards(id,memberid,name,desc,datecreated,isactive) 
                              VALUES(?,?,?,?,?,?)" );
                  
                          $uuid = $this->uuid();
                          $memberid = 1;
                          $date = Utils::getDate();
                          $isactive = 1;
                  
                          $sth->bindParam( 1, $uuid );
                          $sth->bindParam( 2, $memberid );
                          $sth->bindParam( 3, $name );
                          $sth->bindParam( 4, $desc );
                          $sth->bindParam( 5, $date );
                          $sth->bindParam( 6, $isactive );
                          return $sth->execute();
                      } catch( PDOException $e ) { 
                          /*
                           * save the error to the error log defined as @ERROR_LOG
                           */ 
                          file_put_contents( ERROR_LOG, ( "
                  " . Utils::getDate() . " : " . $e->getMessage() ), FILE_APPEND);  
                          die( "FATAL ERROR...Please check the error log." );
                      }
                  }
                  

                  但是,每次我收到此錯誤2012-05-11 14:40:50 : SQLSTATE[42000]: 語法錯誤或訪問沖突:1064 您的 SQL 語法有錯誤;請查看手冊對應于您的 MySQL 服務器版本,以便在 'desc,datecreated,isactive) 附近使用正確的語法 VALUES('d5989c7e-9b98-11e1-88cd-0026b936528c','1' at line 1"

                  However, every time I get this error "2012-05-11 14:40:50 : 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 'desc,datecreated,isactive) VALUES('d5989c7e-9b98-11e1-88cd-0026b936528c','1' at line 1"

                  我使用 bindValue() 嘗試了相同的函數,只是將帶有直接值的數組放入 $sth->execute() 函數中,但我總是收到同樣的錯誤.也許外面的眼睛可以發現我遺漏或做錯的事情?

                  I have tried the same function using bindValue() and just putting the array with direct values into the $sth->execute() function but I always receive the same error. Maybe an outside eye can spot something I'm missing or doing wrong?

                  推薦答案

                  將你的字段名稱封裝在反引號中 (`),desc 是一個保留字.

                  Encapsulate your field names in backticks (`), desc is a reserved word.

                  $sth = $this->getLink()->prepare( "INSERT INTO `boards` (`id`,`memberid`,`name`,`desc`,`datecreated`,`isactive`) 
                              VALUES(?,?,?,?,?,?)" );
                  

                  這篇關于PHP PDO 語法錯誤或訪問沖突:插入時為 1064的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                    <bdo id='77sDb'></bdo><ul id='77sDb'></ul>
                      <tfoot id='77sDb'></tfoot>

                          <tbody id='77sDb'></tbody>

                          <small id='77sDb'></small><noframes id='77sDb'>

                          <legend id='77sDb'><style id='77sDb'><dir id='77sDb'><q id='77sDb'></q></dir></style></legend>
                          <i id='77sDb'><tr id='77sDb'><dt id='77sDb'><q id='77sDb'><span id='77sDb'><b id='77sDb'><form id='77sDb'><ins id='77sDb'></ins><ul id='77sDb'></ul><sub id='77sDb'></sub></form><legend id='77sDb'></legend><bdo id='77sDb'><pre id='77sDb'><center id='77sDb'></center></pre></bdo></b><th id='77sDb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='77sDb'><tfoot id='77sDb'></tfoot><dl id='77sDb'><fieldset id='77sDb'></fieldset></dl></div>
                          1. 主站蜘蛛池模板: 国产日韩精品一区 | 国产精品一区二区三区在线 | 毛片视频网址 | 色www精品视频在线观看 | 国产精品777一区二区 | 午夜日韩视频 | 91文字幕巨乱亚洲香蕉 | 国产精品国产a级 | 亚洲综合区| 亚洲午夜视频在线观看 | 正在播放国产精品 | 7799精品视频天天看 | 国产成视频在线观看 | 亚洲一区在线免费观看 | 婷婷国产一区二区三区 | 色偷偷噜噜噜亚洲男人 | 99re6热在线精品视频播放 | 草草精品 | 欧美成人h版在线观看 | 亚洲品质自拍视频网站 | www日韩| 国产精品免费一区二区三区四区 | 综合成人在线 | 国产999在线观看 | 人成久久| 久久久久国产一区二区三区 | 最新国产精品视频 | 一区二区三区精品视频 | 一级无毛片 | 国产精品片 | 国产精品不卡一区二区三区 | 精品日韩在线 | caoporn地址| 亚洲高清av| 免费视频一区二区 | 二区国产| 亚洲一区二区免费视频 | 欧美一区二区三区四区视频 | 伊人久久综合 | 久久亚洲一区二区 | 欧美日韩在线视频一区二区 |