---------------------------------------------------------------------------- ----------------- 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 copy. ---------------------------------------------------------------------------- ----------------- 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 = " SELECT table_type, table_code, table_desc FROM msf010 WHERE table_type = 'MT'"; //OCIInternalDebug(1); $connection_id = ocilogon("USERNAME","PASSWORD","TNSNAME"); $result_id = ociparse($connection_id, $sql); $success = ociexecute($result_id); if($success){ while(@ocifetchinto($result_id,&$row,OCI_ASSOC+OCI_RETURN_NULLS)){ $data[] = $row; } ocifreestatement($result_id); }else{ $error= OCIError(); echo "Error is $error<br>\n"; } ocilogoff($result_id); 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 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 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 -- ______________________________________ Kristofer Widholm Web Pharmacy [EMAIL PROTECTED] 191 Grand Street, Brooklyn NY 11211 718.599.4893 ______________________________________ -- 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]