(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...") |
m (refresh SMW properties) |
||
(One intermediate revision by one other user not shown) | |||
Line 10: | Line 10: | ||
|example=<nowiki>list ($type, $size) = $smcFunc['db_calculate_type']($column['type'], $column['size']);</nowiki> | |example=<nowiki>list ($type, $size) = $smcFunc['db_calculate_type']($column['type'], $column['size']);</nowiki> | ||
}} | }} | ||
<noinclude> | <noinclude> | ||
[[Category:Database Package Functions | [[Category:Database Package Functions]]</noinclude> | ||
Latest revision as of 16:44, 11 October 2012
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']);