ads_cursor

Advantage PHP Extension

  Previous topic Next topic  

Returns the cursor name of a given result set.

Syntax

string ads_cursor( int result_id )

Parameters

result_id (I)

ID of a result set.

Remarks

Returns the cursor name for the given result_id.

Example

<?

echo "Connecting to Server<br>\n";

$rConn = ads_connect( "DataDirectory=\\\\server1\\share1\\data\\;ServerTypes=2", "", "" );

echo "Connected<br>\n";

 

echo "Executing a statement<br>\n";

$rResult = ads_do( $rConn, "SELECT SUM( amount ) as Total FROM orders" );

echo "Statement executed<br>\n";

 

echo "Getting the cursor name<br>\n";

$sName = ads_cursor( $rResult );

echo "The cursor is named: " . $sName . "<br>\n";

 

echo "Closing the connection<br>\n";

ads_close( $rConn );

echo "Disconnected<br>\n";

?>