• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP odbc_errormsg函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中odbc_errormsg函数的典型用法代码示例。如果您正苦于以下问题:PHP odbc_errormsg函数的具体用法?PHP odbc_errormsg怎么用?PHP odbc_errormsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了odbc_errormsg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _catch

 function _catch($msg = "")
 {
     if (!($this->error = odbc_errormsg($this->conn))) {
         return true;
     }
     $this->error($msg . "<br>{$this->query} \n {$this->error}");
 }
开发者ID:jvinet,项目名称:pronto,代码行数:7,代码来源:odbc.php


示例2: HandleError

 protected function HandleError($conn)
 {
     if (Config::DAO_DEBUG_MODE == 1) {
         odbc_errormsg($conn);
     }
     return false;
 }
开发者ID:hadleymj,项目名称:Senior-Design-Fall-2009,代码行数:7,代码来源:DAO.php


示例3: query

 /**
  * Enter description here...
  *
  * @param unknown_type $query
  *
  * @return unknown
  */
 public static function query($query)
 {
     if (!($var = \odbc_exec(self::$conn, $query))) {
         throw new DBException('(' . $query . ') had an error: ' . \odbc_errormsg());
     }
     return $var;
 }
开发者ID:johsbk,项目名称:penguin,代码行数:14,代码来源:ODBC.php


示例4: changeUserPassword

 public function changeUserPassword($userName, $userOldPassword, $userNewPassword, $portalID)
 {
     VDSN;
     $conn = odbc_connect(VDSN, USER, PW) or die('ODBC Error:: ' . odbc_error() . ' :: ' . odbc_errormsg() . ' :: ' . VDSN);
     //test for user name
     if ($conn) {
         $sql = "SELECT '1' outputFlag FROM Portal_User WHERE User_Name = '" . $userName . "' AND Portal_ID = '" . $portalID . "'";
         $rs = odbc_exec($conn, $sql);
         $row = odbc_fetch_row($rs);
         if ($row == null) {
             odbc_close($conn);
             return "You have entered an invalid user name; please try again.";
         }
     }
     //test for password
     if ($conn) {
         $sql = "SELECT '1' FROM Users WHERE User_Name = '" . $userName . "' AND User_Password = '" . $userOldPassword . "'";
         $rs = odbc_exec($conn, $sql);
         $row = odbc_fetch_row($rs);
         if ($row == null) {
             odbc_close($conn);
             return "You have entered an invalid password for your account; please try again.";
         }
     }
     //save new password
     if ($conn) {
         $sql = "UPDATE Users SET User_Password = '" . $userNewPassword . "' WHERE User_Name = '" . $userName . "'";
         $rs = odbc_exec($conn, $sql);
     }
     return "OK";
 }
开发者ID:nemac,项目名称:flash-fcav,代码行数:31,代码来源:NEMAC_MapViewer_queries.php


示例5: db_erro

function db_erro($db_resource)
{
    $erro = odbc_errormsg($db_resource);
    if (!empty($erro)) {
        echo 'ERRO: ' . $erro;
    }
}
开发者ID:Vinaze,项目名称:Form-CRUD,代码行数:7,代码来源:funcoes_db.php


示例6: ErrorMsg

 function ErrorMsg()
 {
     if ($this->haserrorfunctions) {
         return odbc_errormsg($this->_connectionID);
     } else {
         return ADODBConnection::ErrorMsg();
     }
 }
开发者ID:qoire,项目名称:portal,代码行数:8,代码来源:adodb-odbc.inc.php


示例7: setError

 /**
  * set error code and message based on last odbc connection/prepare/execute error.
  * 
  * @todo: consider using GET DIAGNOSTICS for even more message text:
  * http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzala%2Frzalafinder.htm
  * 
  * @param null $conn
  */
 protected function setError($conn = null)
 {
     // is conn resource provided, or do we get last error?
     if ($conn) {
         $this->setErrorCode(odbc_error($conn));
         $this->setErrorMsg(odbc_errormsg($conn));
     } else {
         $this->setErrorCode(odbc_error());
         $this->setErrorMsg(odbc_errormsg());
     }
 }
开发者ID:zendtech,项目名称:ibmitoolkit,代码行数:19,代码来源:Odbcsupp.php


示例8: ErrorMsg

 function ErrorMsg()
 {
     if ($this->_haserrorfunctions) {
         if (empty($this->_connectionID)) {
             return @odbc_errormsg();
         }
         return @odbc_errormsg($this->_connectionID);
     } else {
         return ADOConnection::ErrorMsg();
     }
 }
开发者ID:sraj4,项目名称:EthicsPublicHtmlProd,代码行数:11,代码来源:adodb-odbc.inc.php


示例9: die_sql

 private function die_sql($sql, $line, $file, $function, $class)
 {
     error_log($file . ' : L ' . $line . chr(10) . $sql . chr(10) . odbc_errormsg($this->link));
     $err = '<span style="font-size:18px;font-weight:bold;">lisha</span><br /><br />';
     $err .= 'Erreur MySQL<br /><br />';
     $err .= '<b style="color:#DD2233;">Erreur ' . odbc_error($this->link) . "</b> : <b>" . odbc_errormsg($this->link) . '</b><br /><br />';
     $err .= 'Classe : ' . $class . ' - Ligne : ' . $line . ' - ' . $file . ' - ' . $function . '<br /><br /><br />';
     $err .= '<textarea style="width:90%;height:200px;;">' . $sql . '</textarea>';
     echo $err;
     die;
 }
开发者ID:bubaigcect,项目名称:magictree,代码行数:11,代码来源:class_odbc.php


示例10: raiseError

 public function raiseError($sql = NULL, $prms = array())
 {
     $error_id = odbc_error($this->_con);
     if (strlen($error_id) == 5) {
         $error_msg = "[" . $error_id . "] " . odbc_errormsg($this->_con);
         //odbc_close($this->_con);
         if (!empty($sql)) {
             $error_msg = $error_msg . "-------------------------\nSQL trace: " . $sql . ", \n-------------------------\nParams: " . print_r($prms, 1);
         }
         throw new Error($error_msg);
     }
 }
开发者ID:startsevsa,项目名称:cash,代码行数:12,代码来源:odbc.php


示例11: query

 function query($sql)
 {
     $this->conn = $this->db_connect() or die("No fue posible connectar con la base de dados -> " . "{$this->database}");
     if ($res = odbc_exec($this->conn, $sql) or die("Inválida: " . odbc_errormsg())) {
         return $res;
     } else {
         echo "No es posible ejecutar esta consulta: <br>";
         echo "{$sql}";
         $this->db_close($this->conn);
         return false;
     }
 }
开发者ID:ricardoletelier,项目名称:conexion-mysqli-postgresql-desde-php,代码行数:12,代码来源:odbc.php


示例12: get_results

function get_results($query)
{
    global $con;
    if ($query == "") {
        echo "";
    } else {
        $res = @odbc_exec($con, $query);
        if ($res) {
            odbc_result_all($res);
        } else {
            echo odbc_errormsg($con);
        }
    }
}
开发者ID:radityopw,项目名称:online_sql_quiz,代码行数:14,代码来源:functions.php


示例13: myOdbcConnect

/**
 * Helper function for connecting to a odb database.
 * Just does some error checking.
 *
 * Returns NULL on error.
 *
 */
function myOdbcConnect($dataSourceName, $username, $password)
{
    if (!function_exists('odbc_connect')) {
        //$logger->log(WARN,
        Logger::warn("Virtuoso adapter requires PHP ODBC extension to be loaded");
        return NULL;
    }
    $con = @odbc_connect($dataSourceName, $username, $password);
    if (null == $con) {
        //$logger->log(WARN,
        Logger::warn("Unable to connect to Virtuoso Universal Server via ODBC: " . odbc_errormsg());
        return NULL;
    }
    return $con;
}
开发者ID:ljarray,项目名称:dbpedia,代码行数:22,代码来源:helpers.php


示例14: login

 private function login(client_login_info $login_info)
 {
     //TODO: odbc connect probably supports these DSNs: http://www.connectionstrings.com/oracle/
     //may be something like "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;"
     $connect = odbc_connect($login_info->DSN, $login_info->user, $login_info->pass);
     if ($connect === false) {
         $this->login_error_message = odbc_error() . ": " . odbc_errormsg();
     } else {
         $this->logged_in = true;
         $this->connection = $connect;
     }
     if ($this->logged_in) {
         $login_info->save_in_cookies();
     }
 }
开发者ID:Tkachov,项目名称:POD,代码行数:15,代码来源:client.php


示例15: OM_InnovExport_Order_Release

function OM_InnovExport_Order_Release($OrderNumber)
{
    if ($OrderNumber != '') {
        $connect = odbc_connect("qa-om", "sa", "systemop", SQL_CUR_USE_ODBC);
        if (!$connect) {
            exit("Connection Failed: " . $connect);
        }
        $sql = "use QAData update Orders set InnovExport = '0' where OrderNumber = '{$OrderNumber}'";
        $result = odbc_exec($connect, $sql);
        if (!$result) {
            odbc_errormsg($connect);
            exit("Error in SQL");
        }
        echo '<table class="table_main">';
        echo "<tr><td colspan='6' style='text-align:center;color:green;'>Reset {$OrderNumber}</td></tr>";
        echo '</table>';
    }
}
开发者ID:r00tdenied,项目名称:vcms,代码行数:18,代码来源:f_OM_logic_core.php


示例16: dbQuery

function dbQuery($query, $show_errors = true, $all_results = true, $show_output = true)
{
    if ($show_errors) {
        error_reporting(E_ALL);
    } else {
        error_reporting(E_PARSE);
    }
    // Connect to the MS Access Database via ODBC connection (http://www.w3schools.com/PHP/php_db_odbc.asp)
    // NOTE: execute statements from above one at a time because MS Access doesn't support stacked SQL commands
    $link = odbc_connect("testdb", "", "");
    if (!$link) {
        die(odbc_errormsg());
    }
    // Print results in HTML
    print "<html><body>\n";
    // Print SQL query to test sqlmap '--string' command line option
    //print "<b>SQL query:</b> " . $query . "<br>\n";
    // Perform SQL injection affected query
    $result = odbc_exec($link, $query);
    if (!$result) {
        if ($show_errors) {
            print "<b>SQL error:</b> " . odbc_errormsg() . "<br>\n";
        }
        exit(1);
    }
    if (!$show_output) {
        exit(1);
    }
    print "<b>SQL results:</b>\n";
    print "<table border=\"1\">\n";
    while ($line = odbc_fetch_array($result)) {
        print "<tr>";
        foreach ($line as $col_value) {
            print "<td>" . $col_value . "</td>";
        }
        print "</tr>\n";
        if (!$all_results) {
            break;
        }
    }
    print "</table>\n";
    print "</body></html>";
}
开发者ID:dieface,项目名称:testenv,代码行数:43,代码来源:access.inc.php


示例17: exec

 /**
  * Executes the supplied SQL statement and returns
  * the result of the call.
  * 
  * @access  public
  *  
  * @param   string  SQL to execute
  */
 function exec()
 {
     if (func_num_args() > 1) {
         $args = func_get_args();
         $sql = $args[0];
         unset($args[0]);
         // remove the sql
         $args = array_values($args);
         // and reset the array index
     } else {
         $sql = func_get_arg(0);
     }
     $this->ensureConnection();
     if (isset($args)) {
         $result = odbc_prepare($this->connection, $sql);
         if (!odbc_execute($result, $args)) {
             throw new Exception(odbc_errormsg($this->connection));
         }
         return odbc_num_rows($result);
     } else {
         return odbc_exec($this->connection, $sql);
     }
 }
开发者ID:rshariffdeen,项目名称:olio,代码行数:31,代码来源:ODBCConnection.php


示例18: processInterface

 public function processInterface()
 {
     // Make sure there was no conneg error prior to this process call
     if ($this->ws->conneg->getStatus() == 200) {
         $this->ws->validateQuery();
         // If the query is still valid
         if ($this->ws->conneg->getStatus() == 200) {
             // Create and describe the resource being registered
             // Note: we make sure we remove any previously defined triples that we are
             //       about to re-enter in the graph. All information other than these
             //       new properties will remain in the graph
             $query = "delete from <" . $this->ws->wsf_graph . ">\n                  { \n                    <" . $this->ws->registered_uri . "> a <http://purl.org/ontology/wsf#WebService> .\n                    <" . $this->ws->registered_uri . "> <http://purl.org/dc/terms/title> ?title . \n                    <" . $this->ws->registered_uri . "> <http://purl.org/ontology/wsf#endpoint> ?endpoint .\n                    <" . $this->ws->registered_uri . "> <http://purl.org/ontology/wsf#hasCrudUsage> ?crud_usage .\n                    ?crud_usage ?crud_property ?crud_value .\n                  }\n                  where\n                  {\n                    graph <" . $this->ws->wsf_graph . ">\n                    {\n                      <" . $this->ws->registered_uri . "> a <http://purl.org/ontology/wsf#WebService> .\n                      <" . $this->ws->registered_uri . "> <http://purl.org/dc/terms/title> ?title . \n                      <" . $this->ws->registered_uri . "> <http://purl.org/ontology/wsf#endpoint> ?endpoint .\n                      <" . $this->ws->registered_uri . "> <http://purl.org/ontology/wsf#hasCrudUsage> ?crud_usage .\n                      ?crud_usage ?crud_property ?crud_value .\n                    }\n                  }\n                  insert into <" . $this->ws->wsf_graph . ">\n                  {\n                    <" . $this->ws->registered_uri . "> a <http://purl.org/ontology/wsf#WebService> .\n                    <" . $this->ws->registered_uri . "> <http://purl.org/dc/terms/title> \"" . $this->ws->registered_title . "\" .\n                    <" . $this->ws->registered_uri . "> <http://purl.org/ontology/wsf#endpoint> \"" . $this->ws->registered_endpoint . "\" .\n                    <" . $this->ws->registered_uri . "> <http://purl.org/ontology/wsf#hasCrudUsage> <" . $this->ws->registered_uri . "usage/> .\n                    \n                    <" . $this->ws->registered_uri . "usage/> a <http://purl.org/ontology/wsf#CrudUsage> ;\n                    <http://purl.org/ontology/wsf#create> " . ($this->ws->crud_usage->create ? "\"True\"" : "\"False\"") . " ;\n                    <http://purl.org/ontology/wsf#read> " . ($this->ws->crud_usage->read ? "\"True\"" : "\"False\"") . " ;\n                    <http://purl.org/ontology/wsf#update> " . ($this->ws->crud_usage->update ? "\"True\"" : "\"False\"") . " ;\n                    <http://purl.org/ontology/wsf#delete> " . ($this->ws->crud_usage->delete ? "\"True\"" : "\"False\"") . " .\n                    \n                    <" . $this->ws->wsf_graph . "> <http://purl.org/ontology/wsf#hasWebService> <" . $this->ws->registered_uri . ">.\n                  }";
             @$this->ws->db->query($this->ws->db->build_sparql_query(str_replace(array("\n", "\r", "\t"), " ", $query), array(), FALSE));
             if (odbc_error()) {
                 $this->ws->conneg->setStatus(500);
                 $this->ws->conneg->setStatusMsg("Internal Error");
                 $this->ws->conneg->setStatusMsgExt($this->ws->errorMessenger->_300->name);
                 $this->ws->conneg->setError($this->ws->errorMessenger->_300->id, $this->ws->errorMessenger->ws, $this->ws->errorMessenger->_300->name, $this->ws->errorMessenger->_300->description, odbc_errormsg(), $this->ws->errorMessenger->_300->level);
                 return;
             }
         }
     }
 }
开发者ID:neuroidss,项目名称:OSF-Web-Services,代码行数:23,代码来源:DefaultSourceInterface.php


示例19: processInterface

 public function processInterface()
 {
     // Make sure there was no conneg error prior to this process call
     if ($this->ws->conneg->getStatus() == 200) {
         $this->ws->validateQuery();
         // If the query is still valid
         if ($this->ws->conneg->getStatus() == 200) {
             $dateTime = date("c");
             /*
               Ordered changes for a record using sparql and this part of the WSF ontology.
             
               sparql select * from <http://.../wsf/track/> where 
               {
                 ?s <http://purl.org/ontology/wsf#record> <http://.../wsf/datasets/67/resource/Welfare> .
             
                 ?s <http://purl.org/ontology/wsf#changeTime> ?time.
               }
               ORDER BY asc(xsd:dateTime(?time));
             */
             $trackRecord = "<" . $this->ws->wsf_graph . "track/record/" . md5($dateTime . $this->ws->record . $this->ws->fromDataset) . "> \n                           a <http://purl.org/ontology/wsf#ChangeState> ;";
             $trackRecord .= "<http://purl.org/ontology/wsf#record> <" . $this->ws->record . "> ;";
             $trackRecord .= "<http://purl.org/ontology/wsf#fromDataset> <" . $this->ws->fromDataset . "> ;";
             $trackRecord .= "<http://purl.org/ontology/wsf#changeTime> \"" . $dateTime . "\"^^xsd:dateTime ;";
             $trackRecord .= "<http://purl.org/ontology/wsf#action> \"" . $this->ws->action . "\" ;";
             $trackRecord .= "<http://purl.org/ontology/wsf#previousState> \"\"\"" . $this->ws->previousState . "\"\"\" ;";
             $trackRecord .= "<http://purl.org/ontology/wsf#previousStateMime> \"" . $this->ws->previousStateMime . "\" ;";
             $trackRecord .= "<http://purl.org/ontology/wsf#performer> \"" . $this->ws->performer . "\" .";
             $this->ws->db->query("DB.DBA.TTLP_MT('" . addslashes($trackRecord) . "', '" . $this->ws->wsf_graph . "track/" . "', '" . $this->ws->wsf_graph . "track/" . "')");
             if (odbc_error()) {
                 $this->ws->conneg->setStatus(400);
                 $this->ws->conneg->setStatusMsg("Bad Request");
                 $this->ws->conneg->setError($this->ws->errorMessenger->_302->id, $this->ws->errorMessenger->ws, $this->ws->errorMessenger->_302->name, $this->ws->errorMessenger->_302->description, odbc_errormsg(), $this->ws->errorMessenger->_302->level);
                 return;
             }
         }
     }
 }
开发者ID:neuroidss,项目名称:OSF-Web-Services,代码行数:37,代码来源:DefaultSourceInterface.php


示例20: rollback

 /**
  * Rollback changes in a transaction.
  * @param  string  optinal savepoint name
  * @return void
  * @throws DibiDriverException
  */
 public function rollback($savepoint = NULL)
 {
     if (!odbc_rollback($this->connection)) {
         throw new DibiDriverException(odbc_errormsg($this->connection) . ' ' . odbc_error($this->connection));
     }
     odbc_autocommit($this->connection, TRUE);
 }
开发者ID:jakubkulhan,项目名称:shopaholic,代码行数:13,代码来源:odbc.php



注:本文中的odbc_errormsg函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP odbc_exec函数代码示例发布时间:2022-05-15
下一篇:
PHP odbc_error函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap