Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to scan the column definitions in a MySQL table. Then I need to separate them into 2 groups: those that should be '0' (INTs, for example) and those that should be "" (CHAR, ENUMS, VARCHAR, for example). And associate the column names with these values. Let me explain...
So if field_a is an INT, I would set up a hash, such as:
Or if field_b is determined to be a CHAR, the hash would be:$hash{field_a} = 0;
How can I efficiently do this? Thanks, Monks.$hash{field_b} = "";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI scanning of column definitions
by rnahi (Curate) on Jul 16, 2005 at 09:00 UTC | |
|
Re: DBI scanning of column definitions
by gam3 (Curate) on Jul 16, 2005 at 03:58 UTC |