久久久久久久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 語(yǔ)法錯(cuò)誤或訪問(wèn)沖突:插入時(shí)為 1064

        PHP PDO Syntax error or access violation: 1064 on insert(PHP PDO 語(yǔ)法錯(cuò)誤或訪問(wèn)沖突:插入時(shí)為 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 語(yǔ)法錯(cuò)誤或訪問(wèn)沖突:插入時(shí)為 1064的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我有一個(gè)表名板,我正在嘗試使用當(dāng)前代碼插入數(shù)據(jù)

                  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." );
                      }
                  }
                  

                  但是,每次我收到此錯(cuò)誤2012-05-11 14:40:50 : SQLSTATE[42000]: 語(yǔ)法錯(cuò)誤或訪問(wèn)沖突:1064 您的 SQL 語(yǔ)法有錯(cuò)誤;請(qǐng)查看手冊(cè)對(duì)應(yīng)于您的 MySQL 服務(wù)器版本,以便在 'desc,datecreated,isactive) 附近使用正確的語(yǔ)法 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() 嘗試了相同的函數(shù),只是將帶有直接值的數(shù)組放入 $sth->execute() 函數(shù)中,但我總是收到同樣的錯(cuò)誤.也許外面的眼睛可以發(fā)現(xiàn)我遺漏或做錯(cuò)的事情?

                  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?

                  推薦答案

                  將你的字段名稱(chēng)封裝在反引號(hào)中 (`),desc 是一個(gè)保留字.

                  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(?,?,?,?,?,?)" );
                  

                  這篇關(guān)于PHP PDO 語(yǔ)法錯(cuò)誤或訪問(wèn)沖突:插入時(shí)為 1064的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)
                    <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. 主站蜘蛛池模板: 国产乱人伦精品一区二区 | 欧美aa在线| 久久99精品久久久久婷婷 | 国产精品欧美一区二区三区 | 久久国产亚洲 | 成人精品一区二区三区中文字幕 | 日本天堂视频在线观看 | 国产综合视频 | 在线免费观看黄a | 国产激情毛片 | 国产精品欧美一区二区 | 国产精品久久午夜夜伦鲁鲁 | 欧美一区二区三区四区五区无卡码 | 中文字幕精 | av在线一区二区三区 | 久久久久午夜 | 亚洲精品一二三区 | 欧美日韩综合 | 欧区一欧区二欧区三免费 | 日本黄色的视频 | 亚洲一区二区精品视频在线观看 | 日韩精品久久一区 | a视频在线 | 黄一区二区三区 | 国产精品视频在线播放 | 欧美日韩综合 | 午夜寂寞影院列表 | 亚洲国产精品自拍 | 国产视频二区 | 欧美福利精品 | 狠狠草视频 | 国产精品精品久久久 | 欧美最猛黑人 | 日韩成人免费视频 | 成人性视频免费网站 | av中文字幕在线观看 | 国产h视频 | 午夜在线影院 | 成人免费视频网站在线观看 | 性在线 | 免费久久久久久 |