well, not really in this case. let me explain what i'm doing:
i have an oracle database full of tables. i need to move the tables and associated data to a mysql instance. i'm writing a script to do all of this semi-automatically.
in order to find the column types for the oracle tables i'm querying: "select * from ora_table". i fetch a row into an array, then i can use the ora_ColumnType( ) (and ora_ColumnSize( ) and ora_ColumnName( )) function to get the info I need to construct a similar table in mysql.
the problem is that some of the fields in some of the oracle tables have null values. therefore, when i pull a row from the oracle cursor that i queried on, i don't get values (hence i don't get slots in my array for that column so i can't get ColumnType, etc). if i could just make sure to get a row with NO null values (assuming one such row exists in each of the tables in question) then i would have no problems.
hope that makes sense.
thanks,
Josh.
John Holmes wrote:
You have to eventually know the names, or have the assigned to a variable...right? Otherwise you can't do anything.
You can use variable names for the table and fieldnames.
SELECT * FROM $table WHERE $field[0]=null..etc..
Will that work for you?
---John Holmes...