Icon edb_sensitive

Returns the whether a command returned a sensitive result set cursor.

Syntax
edb_sensitive(<CommandHandle>)

<CommandHandle> =

Handle of command returned by edb_prepare function

Returns
Result set cursor sensitivity (BOOLEAN) if successful,
or FALSE if there are any errors

Usage
The edb_sensitive function returns whether any SELECT statement returned a sensitive result set cursor.

Information Scripts and procedures can also return sensitive result set cursors, but the ElevateDB PHP extension cannot detect their status, so this function will always return FALSE. Also, direct table commands always return FALSE for the edb_sensitive function, but are always sensitive due to the fact that they are direct table opens.

Examples
<?php

// The following script connects to an ElevateDB
// Server and database, prepares a parameterized
// SELECT statement, sets the parameter values,
// executes the statement, and then displays the
// whether the result set cursor is sensitive or not

$con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+
                   "uid=Administrator;pwd=EDBDefault;database=Test");
if (!$con)
  {
  die("Could not connect: " . edb_errmsg());
  }

$cmd = edb_prepare($con,"SELECT * FROM customer WHERE State=:State");
edb_setparam($cmd,"State","FL");
$cursor = edb_execute($cmd,TRUE);

if (edb_sensitive($cmd))
  {
  echo "Command returned a sensitive result set cursor";
  }
else
  {
  echo "Command did not return a sensitive result set cursor";
  }

edb_disconnect($con);
?>
Image