note 45521 added to function.oci-connect

From: Date: Thu, 09 Sep 2004 15:57:27 +0000
Subject: note 45521 added to function.oci-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-76334@lists.php.net to get a copy of this message
If you are used to using mysql, this might be helpful. <?php // oracle functions function oracle_query( $sql, $conn ) { $statement = @oci_parse($conn, $sql); if( !$statement ) { $e = oci_error($conn); // For oci_parse errors pass the connection handle echo htmlentities($e['message']); return 0; } if( @oci_execute($statement, OCI_DEFAULT) ) { $result = $statement; if( !oci_free_statement($statement) ) { $err = oci_error($statement); echo "Oracle Error: " . $err['text']; return 0; } else { return $result; } } else { $err = oci_error($statement); echo "Oracle Error: " . $err['text']; return 0; } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.oci-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45521 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45521&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45521&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76334) next »