Re: DB_DataObject: Defaults? ENUM sets?
| From: | Alan Knowles | Date: | Thu, 06 May 2004 03:26:01 +0000 |
| Subject: | Re: DB_DataObject: Defaults? ENUM sets? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12325@lists.php.net to get a copy of this message | ||
Mike Zornek wrote:
I was wondering if DB_DataObject used the default values of the database in anyway. For example if I created a new "blank" object based on a table, and in that the table definition the default value for column "Gender" was "M" would my new object have that value? insert should ignore the gender column if you dont assign the gender object property. - you would then have to do a fetch to get the real data back though.
Also, if a column is of type enum, is there any way to get an array of the possible allowed values? AFAIK there is no reliable way to get enum data from the database backend. - I normally just create a method in the extended class and let that sort it out.Regards Alan
~ Mike ----- Mike Zornek Web Designer, Media Developer, Programmer and Geek Personal site: <http://MikeZornek.com> New Project: <http://WebDevWiki.com>-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com