Welcome to GuardiansWorlds.com
 
 

  User Info Box

Anonymous
3.145.85.212
Nickname:

Password:

Security Code:
Security Code
Type Security Code:


User Stats:
Today: 0
Yesterday: 0
This Month: 0
This Year: 0
Total Users: 117
New Members:
Online Now:
  Guests: 36
3.145.xx.xxx
85.208.xx.xxx
47.128.xx.xxx
18.221.xx.xx
172.71.xxx.xx

  Total Online: 36
Server Time:
Apr 04, 2025
04:24 pm UTC
 

  Modules/Site Links

· Home
· Bible-MM
· Birds-MM
· Car_Show-MM
· Christmas-MM
· Content
· Domaining-MM
· Downloads
· Drugs-MM
· Event Calendar
· FAQ
· Feedback
· Fish-MM
· Gambling_Guide-MM
· Guardians Worlds Chat
· HTML_Manual
· Internet_Traffic_Report
· IP_Tracking Tool
· Journal
· Members List
· Movies-MM
· Music_Sound-MM
· NukeSentinel
· PHP-Nuke_Tools
· PHP_Manual-MM
· PING Tool
· Private Messages
· Recommend Us
· Reptiles-MM
· Search
· SEO_Tools
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top 30
· Topics
· Visitor Mapping System
· Web Links
· Webcams
· Web_Development-MM
· YahooNews
· YahooPool
· Your Account
 

  Categories Menu

· All Categories
· Camaro and Firebird
· FTP Server
· New Camaro
· News
· Online Gaming
 

  Survey

Which is your favorite generation Camaro or Firebird?

1st Gen. 67-69 Camaro
2nd Gen. 70-81 Camaro
3rd Gen. 82-92 Camaro
4th Gen. A 93-97 Camaro
4th Gen. B 98-2002 Camaro
1st Gen. 67-69 Firebird
2nd Gen. 70-81 Firebird
3rd Gen. 82-92 Firebird
4th Gen. A 93-97 Firebird
4th Gen. B 98-2002 Firebird



Results
Polls

Votes: 66
Comments: 0
 

  Cluster Maps

Locations of visitors to this page
 

  Languages

Select Interface Language:

 

 
  sesam_diagnostic

sesam_diagnostic

(PHP 3 CVS only)

sesam_diagnostic --  Return status information for last SESAM call

Description

array sesam_diagnostic ( void )

Returns an associative array of status and return codes for the last SQL query/statement/command. Elements of the array are:

Table 1. Status information returned by sesam_diagnostic()

ElementContents
$array["sqlstate"] 5 digit SQL return code (see the SESAM manual for the description of the possible values of SQLSTATE)
$array["rowcount"] number of affected rows in last update/insert/delete (set after "immediate" statements only)
$array["errmsg"] "human readable" error message string (set after errors only)
$array["errcol"] error column number of previous error (0-based; or -1 if undefined. Set after errors only)
$array["errlin"] error line number of previous error (0-based; or -1 if undefined. Set after errors only)

In the following example, a syntax error (E SEW42AE ILLEGAL CHARACTER) is displayed by including the offending SQL statement and pointing to the error location:

Example 1. Displaying SESAM error messages with error position

<?php
// Function which prints a formatted error message,
// displaying a pointer to the syntax error in the
// SQL statement
function PrintReturncode($exec_str)
{
    
$err = Sesam_Diagnostic();
    
$colspan=4; // 4 cols for: sqlstate, errlin, errcol, rowcount
    
if ($err["errlin"] == -1)
        --
$colspan;
    if (
$err["errcol"] == -1)
        --
$colspan;
    if (
$err["rowcount"] == 0)
        --
$colspan;
    echo
"<table border=\"1\">\n";
    echo
"<tr><th colspan=\"" . $colspan . "\"><span class=\"spanred\">ERROR:</span> ".
         
htmlspecialchars($err["errmsg"]) . "</th></tr>\n";
    if (
$err["errcol"] >= 0) {
        echo
"<tr><td colspan=\"" . $colspan . "\"><pre>\n";
        
$errstmt = $exec_str . "\n";
        for (
$lin=0; $errstmt != ""; ++$lin) {
            if (
$lin != $err["errlin"]) { // $lin is less or greater than errlin
                
if (!($i = strchr($errstmt, "\n")))
                    
$i = "";
                
$line = substr ($errstmt, 0, strlen($errstmt)-strlen($i)+1);
                
$errstmt = substr($i, 1);
                if (
$line != "\n")
                    echo
htmlspecialchars($line);
            } else {
                if (! (
$i = strchr ($errstmt, "\n")))
                    
$i = "";
                
$line = substr ($errstmt, 0, strlen ($errstmt)-strlen($i)+1);
                
$errstmt = substr($i, 1);
                for (
$col=0; $col < $err["errcol"]; ++$col) {
                    echo (
substr($line, $col, 1) == "\t") ? "\t" : ".";
                }
                echo
"<span class=\"spanred\">\\</span>\n";
                echo
"<span class=\"normal\">" . htmlspecialchars($line) . "</span>";
                for (
$col=0; $col < $err["errcol"]; ++$col) {
                    echo (
substr ($line, $col, 1) == "\t") ? "\t" : ".";
                }
                echo
"<span class=\"spanred\">/</span>\n";
            }
        }
        echo
"</pre></td></tr>\n";
    }
    echo
"<tr>\n";
    echo
" <td>sqlstate=" . $err["sqlstate"] . "</td>\n";
    if (
$err["errlin"] != -1)
        echo
" <td>errlin=" . $err["errlin"] . "</td>\n";
    if (
$err["errcol"] != -1)
        echo
" <td>errcol=" . $err["errcol"] . "</td>\n";
    if (
$err["rowcount"] != 0)
         echo
" <td>rowcount=" . $err["rowcount"] . "</td>\n";
    echo
"</tr>\n";
    echo
"</table>\n";
}

if (!
sesam_connect ("mycatalog", "phoneno", "otto"))
  die (
"cannot connect");

$stmt = "SELECT * FROM phone\n" .
        
" WHERE@ LASTNAME='KRAEMER'\n" .
        
" ORDER BY FIRSTNAME";
if (!(
$result = sesam_query ($stmt)))
    
PrintReturncode ($stmt);
?>

See also: sesam_errormsg() for simple access to the error string only

 
 


 
  Disipal DesignsAnti-Spam
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me.
You can syndicate our news using the file backend.php or ultramode.txt This site contains info,links,chat,message board/forum for online games,gaming,other features.Check out my servers and stats for Killing Floor, Quake3 Rocket Arenas & Deathmatch,Trade Wars 2002 & FTP server.Camaro/Firebirds, car info.