當前位置: 首頁>>代碼示例>>PHP>>正文


PHP query::error方法代碼示例

本文整理匯總了PHP中query::error方法的典型用法代碼示例。如果您正苦於以下問題:PHP query::error方法的具體用法?PHP query::error怎麽用?PHP query::error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在query的用法示例。


在下文中一共展示了query::error方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: query

 function reset_sequence($sequence, $newval)
 {
     $this->nextid($sequence);
     $esequence = $sequence . "_seq";
     $SQL = "setval('{$esequence}', {$newval})";
     $query = new query($this, $SQL);
     return $query->error();
 }
開發者ID:carriercomm,項目名稱:xmec,代碼行數:8,代碼來源:postgresql.php

示例2: values

 function reset_sequence($sequence, $newval)
 {
     $this->nextid($sequence);
     $esequence = $sequence . "_seq";
     $sSQL = "Replace into {$esequence} values ('', {$newval})";
     $query = new query($this, $sSQL);
     return $query->error();
 }
開發者ID:pioytazsko,項目名稱:drell,代碼行數:8,代碼來源:_mysql.php

示例3: flush

     echo ".";
     flush();
 }
 $SQL = "select id, attachment from {$rec['table_name']}";
 $q->query($DB, $SQL);
 if ($q->numrows() > 0) {
     echo "Converting Attachments for {$rec['name']}<br />\n";
     while ($rec2 = $q->getrow()) {
         $id = $DB->nextid("{$rec['table_name']}_attachments");
         if ($id == 0 && $DB->type != "mysql") {
             echo "Could not get an id for the attachment.<br />\n";
         } else {
             if ($rec2[attachment]) {
                 $SQL = "Insert into {$rec['table_name']}_attachments (id, message_id, filename) values({$id}, {$rec2['id']}, '{$rec2['attachment']}')";
                 $q2->query($DB, $SQL);
                 $err = $q2->error();
                 if ($err == "") {
                     if ($DB->type == "mysql") {
                         $id = $DB->lastid();
                     }
                     $new_name = "{$AttachmentDir}/{$rec['table_name']}/{$rec2['id']}" . "_{$id}" . strtolower(strrchr($rec2["attachment"], "."));
                     if (!rename("{$AttachmentDir}/{$rec['table_name']}/{$rec2['attachment']}", $new_name)) {
                         echo "Can't save upload file.";
                     }
                 }
             } else {
                 echo "Error adding attachment.  DB said: {$err}<br />\n";
             }
         }
     }
     $SQL = "ALTER TABLE {$rec['table_name']} DROP attachment";
開發者ID:carriercomm,項目名稱:xmec,代碼行數:31,代碼來源:upgrade.php


注:本文中的query::error方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。