db_calculate_type From Online Manual

Revision as of 14:08, 21 October 2011 by Emanuele (talk | contribs) (Created page with "{{smcfunc |function=db_calculate_type |usage=$smcFunc['db_calculate_type'](type_name, type_size, reverse) |description=This function will calculate the type and size for a column...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Usage:

$smcFunc['db_calculate_type'](type_name, type_size, reverse)


Description: This function will calculate the type and size for a column.

Parameters:

  • type_name the type of the column (e.g. int, tinyint, varchar, text, etc.)
  • type_size contains the size of the column (can be empty)
  • reverse whether or not convert types not supported by a specific DBMS.

Example:

list ($type, $size) = $smcFunc['db_calculate_type']($column['type'], $column['size']);



Advertisement: