That doesnt work because the schema is updated by the time the update runs. The only thing I can think of now is to rename the old column and use db_column_exists.
Next question: Is there are Drupal or database-independent date formatting function that produces a DATETIME value. I know I can use date() with something appropriate, but I dont know how efficient that is. Would there be any interest in my submitting a patch for format_date($time, datetime)? Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -----Original Message----- From: [email protected] [mailto:[email protected]]on Behalf Of Nancy Wichmann Sent: Thursday, May 14, 2009 12:46 PM To: [email protected] Subject: Re: [development] DB Column Format Okay, I found: $schema = drupal_get_schema('mytable'); if ($schema['fields']['last_checked']['type'] != 'datetime') { }
No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.29/2114 - Release Date: 5/14/2009 6:28 AM
