conn = OCILogon($id,$passwd,$oracle_sid); } function serverVersion() { return OCIServerVersion($this->conn); } function parse($qry) { $this->stmt=OCIParse($this->conn,$qry); } function parseExec($qry) { $this->stmt=OCIParse($this->conn,$qry); $this->exec(); } function exec($mode=OCI_DEFAULT) { // OCI_DEFAULT : ¸Å¹ø ½ÇÇà½Ã¸¶´Ù ÀÚµ¿ commit°¡ µÇÁö ¾Êµµ·Ï ÇÔ. @OCIExecute($this->stmt,$mode); $this->error = ocierror($this->stmt); if($this->error) $this->disconnect(); } /* OCI_D_FILE OCI_D_LOB OCI_D_ROWID */ function newDescriptor($type) { $this->abstractData = OCINewDescriptor($this->conn,$type); } function freeDescriptor() { OCIFreeDescriptor($this->abstractData); } function defineByName($upper,&$var) { OCIDefineByName($this->stmt,$upper,&$var); } function bindByName($place_holder,&$var,$length) { OCIBindByName($this->stmt,$place_holder,$var,$length); } /* OCI_B_FILE(Binary File) OCI_B_CFILE(Character-File) OCI_B_CLOB(Character_LOB) OCI_B_BLOB(Binary-LOB) OCI_B_B_ROWID(ROWID) */ function bindByNameAbstract($place_holder,$type) { OCIBindByName($this->stmt,$place_holder,&$this->abstractData,-1,$type); return $this->abstractData; // return &$this->abstractData; PARSE ERROR! } function fetch() { return OCIFetch($this->stmt); } function result($i) { // À妽º´Â 0ÀÌ ¾Æ´Ñ 1ºÎÅÍ ½ÃÀÛ return OCIresult($this->stmt,$i); } function fetchInto(&$col,$mode=OCI_ASSOC) { // Ŭ·¡½º´Â µðÆúÆ®°¡ OCI_ASSOC //function fetchInto(&$col,$mode=OCI_NUM) { return OCIFetchInto($this->stmt,&$col,$mode); } function fetchStatement(&$arr) { return OCIFetchStatement($this->stmt,&$arr); } ////////////////////////////////////////////////////////// function numCols() { return OCINumCols($this->stmt); } // $index ´Â 1 ºÎÅÍ ½ÃÀÛ function columnName($index) { return OCIColumnName($this->stmt,$index); } function columnisNULL($index) { return OCIColumnIsNULL($this->stmt,$index); } function columnType($index) { return OCIColumnType($this->stmt,$index); } function columnSize($index) { return OCIColumnSize($this->stmt,$index); } function StatementType() { return OCIStatementType($this->stmt); } function rowCount() { return OCIRowCount($this->stmt); } /////////////////////////////////////////////// function parseFree() { OCIFreeStatement($this->stmt); } function disconnect() { if($this->error) { OCIRollback($this->conn); die("ROLLBACK OCCURRED!! ".$this->error["message"].""); } else { OCICommit($this->conn); } OCILogoff($this->conn); } } // end class //////// Object »ý¼º //////////////////////////////// //$oci = new Oracle_OCI; ////////////////////////////////////////////////////////////// ?>