mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Annotate example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@293475 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
bbc73011bc
commit
c0868bb941
1 changed files with 7 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue