本文整理汇总了PHP中sybase_get_last_message函数的典型用法代码示例。如果您正苦于以下问题:PHP sybase_get_last_message函数的具体用法?PHP sybase_get_last_message怎么用?PHP sybase_get_last_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sybase_get_last_message函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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 Sybase database management system
$link = @sybase_pconnect("192.168.231.144", "testuser", "testpass");
if (!$link) {
die(sybase_get_last_message());
}
// Make 'testdb' the current database
$db_selected = @sybase_select_db("testdb");
if (!$db_selected) {
die(sybase_get_last_message());
}
// 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 = sybase_query($query);
if (!$result) {
if ($show_errors) {
print "<b>SQL error:</b> " . sybase_get_last_message() . "<br>\n";
}
exit(1);
}
if (!$show_output) {
exit(1);
}
print "<b>SQL results:</b>\n";
print "<table border=\"1\">\n";
while ($line = sybase_fetch_assoc($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,代码行数:47,代码来源:sybase_user.inc.php
示例2: errorNative
/**
* Gets the DBMS' native error message produced by the last query
*
* @return string the DBMS' error message
*/
function errorNative()
{
return @sybase_get_last_message();
}
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:9,代码来源:sybase.php
示例3: ErrorMsg
function ErrorMsg()
{
if ($this->_logsql) {
return $this->_errorMsg;
}
if (function_exists('sybase_get_last_message')) {
$this->_errorMsg = sybase_get_last_message();
} else {
$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : 'SYBASE error messages not supported on this platform';
}
return $this->_errorMsg;
}
开发者ID:ceryxSeidor,项目名称:ProyectoPruebaWSV2,代码行数:12,代码来源:adodb-sybase.inc.php
示例4: ErrorMsg
function ErrorMsg()
{
if ($this->_logsql) {
return $this->_errorMsg;
}
$this->_errorMsg = sybase_get_last_message();
return $this->_errorMsg;
}
开发者ID:johnfelipe,项目名称:orfeo,代码行数:8,代码来源:adodb-sybase.inc.php
示例5: ErrorMsg
function ErrorMsg()
{
$this->_errorMsg = sybase_get_last_message();
return $this->_errorMsg;
}
开发者ID:qoire,项目名称:portal,代码行数:5,代码来源:adodb-sybase.inc.php
示例6: _set_stmt_error
protected function _set_stmt_error($state = null, $mode = PDO::ERRMODE_SILENT, $func = '')
{
if ($state === null) {
$state = 'HY000';
}
$this->_set_error(-1, sybase_get_last_message(), $state, $mode, $func);
}
开发者ID:Deepab23,项目名称:clinic,代码行数:7,代码来源:sybase_statement.php
示例7: set_driver_error
public function set_driver_error($state = null, $mode = PDO::ERRMODE_SILENT, $func = '')
{
if ($state === null) {
$state = 'HY000';
}
$this->set_error(-1, sybase_get_last_message(), $state, $mode, $func);
}
开发者ID:Deepab23,项目名称:clinic,代码行数:7,代码来源:sybase.php
示例8: query0
/**
* Execute any statement
*
* @param string sql
* @param bool buffered default TRUE
* @return rdbms.sybase.SybaseResultSet or TRUE if no resultset was created
* @throws rdbms.SQLException
*/
protected function query0($sql, $buffered = TRUE)
{
if (!is_resource($this->handle)) {
if (!($this->flags & DB_AUTOCONNECT)) {
throw new SQLStateException('Not connected');
}
$c = $this->connect();
// Check for subsequent connection errors
if (FALSE === $c) {
throw new SQLStateException('Previously failed to connect');
}
}
if (!$buffered) {
$result = @sybase_unbuffered_query($sql, $this->handle, FALSE);
} else {
if ($this->flags & DB_UNBUFFERED) {
$result = @sybase_unbuffered_query($sql, $this->handle, $this->flags & DB_STORE_RESULT);
} else {
$result = @sybase_query($sql, $this->handle);
}
}
if (FALSE === $result) {
$message = 'Statement failed: ' . trim(sybase_get_last_message()) . ' @ ' . $this->dsn->getHost();
if (!is_resource($error = sybase_query('select @@error', $this->handle))) {
// The only case selecting @@error should fail is if we receive a
// disconnect. We could also check on the warnings stack if we can
// find the following:
//
// Sybase: Client message: Read from SQL server failed. (severity 78)
//
// but that seems a bit errorprone.
throw new SQLConnectionClosedException($message, $sql);
}
$code = current(sybase_fetch_row($error));
switch ($code) {
case 1205:
// Deadlock
throw new SQLDeadlockException($message, $sql, $code);
default:
// Other error
throw new SQLStatementFailedException($message, $sql, $code);
}
}
return TRUE === $result ? $result : new SybaseResultSet($result, $this->tz);
}
开发者ID:Gamepay,项目名称:xp-framework,代码行数:53,代码来源:SybaseConnection.class.php
示例9: error
/**
* Error
*
* Returns an array containing code and message of the last
* database error that has occured.
*
* @return array
*/
public function error()
{
//return array('code' => $query->code, 'message' => sybase_get_last_message());
return array('code' => '', 'message' => sybase_get_last_message());
}
开发者ID:belalangkunyit,项目名称:ci30sybase,代码行数:13,代码来源:sybase_driver.php
示例10: get_error
/**
* Return the last error message
* @return string
*/
protected function get_error()
{
return sybase_get_last_message();
}
开发者ID:jens-wetzel,项目名称:use2,代码行数:8,代码来源:DB_Sybase.php
示例11: error
/**
* Returns the error string.
*
* @return string
*/
function error()
{
return sybase_get_last_message();
}
开发者ID:jr-ewing,项目名称:phpMyFAQ,代码行数:9,代码来源:Sybase.php
示例12: error
public function error()
{
if (!empty($this->connect)) {
return sybase_get_last_message();
} else {
return false;
}
}
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:8,代码来源:SybaseDriver.php
示例13: _setDbError
function _setDbError($query, $errors = null)
{
return $this->_setLastError('Error! ', sybase_get_last_message() . strip_tags($errors), $query);
}
开发者ID:Ambalus,项目名称:DbSimple,代码行数:4,代码来源:Sybase.php
注:本文中的sybase_get_last_message函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论