Annotate example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@293475 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christopher Jones 2010-01-13 01:42:13 +00:00
parent bbc73011bc
commit c0868bb941

View file

@ -70,18 +70,23 @@
<title>Setting the client identifier to the application user</title>
<programlisting role="php">
<![CDATA[
...
<?php
// Find the application user's login name
session_start();
$un = my_validate_session($_SESSION['username']);
$c = oci_connect('myschema', 'welcome', 'localhost/XE');
// Tell Oracle who that user is
oci_set_client_identifier($c, $un);
// The next roundtrip to the database will piggyback the identifier
$s = oci_parse($c, 'select mydata from mytable');
oci_execute($s);
...
?>
...
]]>
</programlisting>
</example>