It should be noted that both PhP4 and PhP5 have function numbers that can be connected to the Oracle data volume and query the result set. However, some function numbers can only be used in PhP5, so if the PHP environment is PhP4
First, you must confirm that the function you are using must be supported by PhP4.
<?
$ Orauser = "Scott ";
$ Orapass = "tiger ";
$ Oradb = "(description = (address_list = (address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521) (CONNECT_DATA = (SID = orcl ))) ";
$ Conn = ocilogon ($ orauser, $ orapass, $ oradb) or die ("ORACLE Server error ");
$ SQL = "select * from EMP ";
$ Stmt = ociparse ($ Conn, $ SQL );
Ociexecute ($ stmt );
While (ocifetch ($ stmt )){
Echo ociresult ($ stmt, 1). '= ';
Echo ociresult ($ stmt, 2). '= ';
Echo ociresult ($ stmt, 3). '= ';
Echo ociresult ($ stmt, 4). '= ';
Echo ociresult ($ stmt, 5). '= ';
Echo ociresult ($ stmt, 6). '= ';
Echo ociresult ($ stmt, 7). '= ';
Echo ociresult ($ stmt, 8 );
Echo "</BR> ";
}
?>