Welcome to GuardiansWorlds.com
 
 

  User Info Box

Anonymous
3.136.11.217
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: 16
3.136.xx.xxx
3.136.xx.xxx
66.249.xx.xx
66.249.xx.xx
3.15.xxx.xxx

  Total Online: 16
Server Time:
Apr 04, 2025
04:18 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_query

sesam_query

(PHP 3 CVS only)

sesam_query -- Perform a SESAM SQL query and prepare the result

Description

string sesam_query ( string query [, bool scrollable] )

Returns: A SESAM "result identifier" on success, or FALSE on error.

A "result_id" resource is used by other functions to retrieve the query results.

sesam_query() sends a query to the currently active database on the server. It can execute both "immediate" SQL statements and "select type" queries. If an "immediate" statement is executed, then no cursor is allocated, and any subsequent sesam_fetch_row() or sesam_fetch_result() call will return an empty result (zero columns, indicating end-of-result). For "select type" statements, a result descriptor and a (scrollable or sequential, depending on the optional boolean scrollable parameter) cursor will be allocated. If scrollable is omitted, the cursor will be sequential.

When using "scrollable" cursors, the cursor can be freely positioned on the result set. For each "scrollable" query, there are global default values for the scrolling type (initialized to: SESAM_SEEK_NEXT) and the scrolling offset which can either be set once by sesam_seek_row() or each time when fetching a row using sesam_fetch_row().

For "immediate" statements, the number of affected rows is saved for retrieval by the sesam_affected_rows() function.

See also: sesam_fetch_row() and sesam_fetch_result().

Example 1. Show all rows of the "phone" table as a HTML table

<?php
if (!sesam_connect("phonedb", "demo", "otto"))
    die(
"cannot connect");
$result = sesam_query("select * from phone");
if (!
$result) {
    
$err = sesam_diagnostic();
    die (
$err["errmsg"]);
}
echo
"<table border>\n";
// Add title header with column names above the result:
if ($cols = sesam_field_array($result)) {
    echo
"<tr><th colspan=" . $cols["count"] . ">Result:</th></tr>\n";
    echo
"<tr>\n";
    for (
$col = 0; $col < $cols["count"]; ++$col) {
        
$colattr = $cols[$col];
        
/* Span the table head over SESAM's "Multiple Fields": */
        
if ($colattr["count"] > 1) {
            echo
"<th colspan=\"" . $colattr["count"] . "\">" . $colattr["name"] .
                
"(1.." . $colattr["count"] . ")</th>\n";
            
$col += $colattr["count"] - 1;
        } else
            echo
"<th>" . $colattr["name"] . "</th>\n";
    }
    echo
"</tr>\n";
}

do {
    
// Fetch the result in chunks of 100 rows max.
    
$ok = sesam_fetch_result($result, 100);
    for (
$row=0; $row < $ok["rows"]; ++$row) {
        echo
" <tr>\n";
        for (
$col = 0; $col < $ok["cols"]; ++$col) {
            if (isset(
$ok[$col][$row])) {
                echo
"<td>" . $ok[$col][$row] . "</td>\n";
            } else {
                echo
"<td>-empty-</td>\n";
            }
        }
        echo
"</tr>\n";
    }
} while (
$ok["truncated"]); // while there may be more data

echo "</table>\n";
// free result id
sesam_free_result($result);
?>

 
 


 
  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.