Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle and PHP question

Re: Oracle and PHP question

From: Cameron Green <cgreenNOSP_at_Mits.uq.edu.au>
Date: Tue, 19 Mar 2002 16:14:18 +1000
Message-ID: <3C96D73A.80207@Mits.uq.edu.au>


For a start you shouldn't use the OCI_* functions in PHP. Try using the ORA_* functions as they are more recent.

A key to using these functions is to remember to set the ORACLE_HOME and ORACLE_SID environmental variables in your script. AFter that you should cruise through it.

The php.net manual has examples of how to use the Oracle functions, however if this is difficult you might try and use the PEAR or PHPLIB database abstractions...there are a number of others Google could tell you about.

Cheerio

damorgan wrote:

> As this is an Oracle usenet group, not a SQL Server one, I am can not fathom
> your assumption that I, or most anyone else here, would know what
> functionality you need.
> 
> So either post an explanation of what you are trying to do in English or
> look at REF CURSORS. Which is my best guess as to what you want.
> 
> But a bit of caution is due. Oracle is not just another brand of SQL Server.
> The architecture is completely different. If you are thinking you are going
> to recreate what you've already done replacing functinality 'A' in SQL
> Server with functionality 'B' in Oracle you are going to make a big mess.
> And please blame it on yourself ... not on Oracle.
> 
> Daniel Morgan
> 
> 
> Michael Segulja wrote:
> 
> 

>> Is there an equivalent function in Oracle to mssql_fetch_object? I have
>> a SQL Server database I use for simple invoicing, and I would like to
>> recreate this database with Oracle. I am taking an Oracle class, so
>> basically it would be for practice.
>>
>> I have a customer table, and a web page to view a list of all customers
>> in the table. Here's basically what I do with the code:
>>
>> mssql_fetch_object(query string to get the customers)
>> print into a table $row->customer, $row->contact.
>>
>> How do I choose only the columns I want with the Oracle functions? I
>> understand there is not an equivalent function to get a result set as an
>> object, so the above does not work. Do I just name the columns in my
>> select statement?
>>
>> Looking at the PHP documentation for OCI8, it looks pretty different
>> from what I'm used to. I really appreciate the help, and any advice on
>> how you guys to it out there in the real world.
>>
>> Thanks,
>>
>> Michael Segulja
>> LMD Computing|Solutions
Received on Tue Mar 19 2002 - 00:14:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US