[development] DB Column Format

Nancy Wichmann nan_wich at bellsouth.net
Thu May 14 18:07:43 UTC 2009


That doesn’t 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 don’t 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: development-bounces at drupal.org
[mailto:development-bounces at drupal.org]On Behalf Of Nancy Wichmann
Sent: Thursday, May 14, 2009 12:46 PM
To: development at drupal.org
Subject: Re: [development] DB Column Format

Okay, I found:
  $schema = drupal_get_schema('mytable');
  if ($schema['fields']['last_checked']['type'] != 'datetime') {


  }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090514/b49eecac/attachment.htm>
-------------- next part --------------

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


More information about the development mailing list