Re: Tableinfo for Oracle
| From: | Tomas V.V.Cox | Date: | Sat, 20 Apr 2002 19:48:58 +0000 |
| Subject: | Re: Tableinfo for Oracle | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5694@lists.php.net to get a copy of this message | ||
Hi Bertrand,
I'll take a look ASAP. Thanks!
Tomas V.V.Cox
Bertrand Mansion wrote:
>
> Hi Tomas,
>
> You will find attached a version of tableinfo() for oci8 which works
> similarly to the mySQL implementation.
>
> You will notice a few differences though:
>
> 1. the returned array is different. It has new keys like 'nullable',
> 'default', 'format' which will prove very useful for the datagrid
> 'edit
> mode' stuff. I would like to see them implemented for mySQL too. I got rid
> of the 'flags' key because this does not apply to Oracle.
>
> 2. If there are, in the database, fields with the same name, some returned
> data will possibly be incorrect. This is because of the lack of PHP Oracle
> functions for getting the column's associated table (sort of mysql_tablename
> function). I don't think there is anything I can do about it. This function
> should be added to PHP as soon as possible.
>
> I never give the same name to my fields and always prefix them with some
> letters but I know some people who don't do that. It will be a problem for
> them. They should not call the tableinfo method from a DB_Result object.
>
> Instead, they can pass it a string with the table name they want metadata
> for.
>
> Maybe we should return a PEAR ERROR if there are more than one returned row
> for a column_name. This way, users will be informed that there are problems
> with their DB.
>
> I am waiting for your comments.
>
> Bertrand Mansion
> Mamasam
>
> ------------------------------------------------------------------------
> Name: oci8_tableinfo.php
> oci8_tableinfo.php Type: Plain Text (text/plain)
> Encoding: base64