当前位置: 首页>>代码示例>>PHP>>正文


PHP odbc_errormsg函数代码示例

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


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


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