[PHP] Re: PHP with Oracle

2002-10-02 Thread Philippe Saladin

 Warning: Unable to load dynamic library 'C:\PHP\extensions/php_oci8.dll' -

there are slashes and backslashes in the string
'C:\PHP\extensions/php_oci8.dll'. it looks odd.
May be you would have a look to include_path and extension_dir in php.ini ?


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] RE: PHP and Oracle resources

2001-01-29 Thread Nold, Mark

Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
[EMAIL PROTECTED] and delete the email document without making a


It's actually pretty easy, just have a read and have a go :)
http://www.php.net/manual/en/ref.oci8.php there are several examples there.

As far as resources, your best bet is to use a DB abstraction library like
PHPLib or the PEAR DB stuff. Im not sure where these projects are at the
moment, but using DB abstraction stops you worrying about those DB specific
calls... but i doubts id want to try to learn something more with such a
close deadline)

Anyway the worlds most basic Oracle query follows.

// Have a look at http://www.php.net/manual/en/function.ocilogon.php

// Also look at http://www.php.net/manual/en/function.ocifetchstatement.php
for easier/faster fetching of data.

$sql = "
 table_type = 'MT'";


$connection_id = ocilogon("USERNAME","PASSWORD","TNSNAME");
$result_id = ociparse($connection_id, $sql);
$success = ociexecute($result_id);

$data[] = $row;
  $error= OCIError();
  echo "Error is $errorbr\n";

function makeTable($data, $options = ""){
  // This is an extremely simple table generator function
  $table = "table $options\n";
  while(list($key,$row) = each($data)){ 
$table .= "tr";
while(list($col,$val) = each($row)){
  $table .= "td$val/td";
$table .= "/tr\n";
  $table .= "/table\n";
  return $table;

echo makeTable($data,"border=1 cellspacing=0");

Mark Nold
Senior Consultant

Change is inevitable, except from vending machines. 

-Original Message-
From: Kristofer Widholm [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 28, 2001 1:47 PM
To: PHP List Post
Subject: PHP and Oracle resources

Well, I've been given the joyous task of implementing the DaveTV 
project at CBS via PHP, using Oracle as a database.

I've never used Oracle before.

Looking at the PHP functions for Oracle, and having heard about it in 
the past, it seems like quite a different approach than any SQL 
database I've ever used.  I still don't get the whole point of cursor 
objects, etc. :-)

It would all be pretty hilarious if it weren't so real, and with a 
big fat deadline looming smack for the end of February.

To get to the point: Anyone have any good PHP  Oracle tutorials, 
resources, books, etc, to point me to?  EVERYTHING I see is MySQL, 
MySQL, MySQL, and all I get for Oracle are lists of unexplained PHP 
function calls.

Just point me in the right direction. I can walk there myself.

Thanks for the help.


Kristofer Widholm
Web Pharmacy
191 Grand Street, Brooklyn  NY  11211

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]