Icon edb_sessid

Returns the current session ID for a connection.

Syntax
edb_sessid(<ConnectionHandle>)

<ConnectionHandle> =

Handle of connection returned by edb_connect function

Returns
The session ID (INTEGER) if successful, or FALSE if
any errors

Usage
The edb_sessid function returns the session ID for a connection. The session ID is useful for linking the current session to various system information tables that are used for remote management of an ElevateDB Server:

ServerSessions Table
ServerSessionStatistics Table
ServerSessionLocks Table

The session ID is not particularly useful for local connections, but can still be used for logging purposes and for linking events in the logged events system information table:

LogEvents Table

back to logs for a particular session.

Examples
<?php

// The following script connects to a local
// ElevateDB configuration and database, displays
// the session ID using the edb_sessid()
// function, and then disconnects using the edb_disconnect()
// function

$con = edb_connect("type=local;charset=Ansi;configpath=C:\\Tutorial;"+
                   "uid=Administrator;pwd=EDBDefault;database=Tutorial");
if (!$con)
  {
  die("Could not connect: " . edb_errmsg());
  }
echo edb_sessid($con);
edb_disconnect($con);
?>
Image