v5:axmls:setprefix
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
axmls:setprefix [2015/12/19 01:56] – mnewnham | v5:axmls:setprefix [2016/01/13 02:26] (current) – ↷ Page moved from axmls:setprefix to v5:axmls:setprefix mnewnham | ||
---|---|---|---|
Line 5: | Line 5: | ||
boolean setPrefix ( | boolean setPrefix ( | ||
- | | + | string $prefix = '' |
optional bool $addUnderscore=true | optional bool $addUnderscore=true | ||
) | ) | ||
Line 12: | Line 12: | ||
Sets a prefix for database objects | Sets a prefix for database objects | ||
- | Call this method to set a standard prefix that will be prepended to all database tables and indices. If the optional $addUnderscore parameter is set, an underscore is automatically appended to the prefix. | + | Call this method to set a standard prefix that will be prepended to **all database tables and indexes**. |
+ | If the optional '' | ||
+ | |||
+ | ===== Usage ===== | ||
+ | <code php> | ||
+ | /* | ||
+ | * Assuming xml schema contains tables a,b,c | ||
+ | */ | ||
+ | $axmls-> | ||
+ | |||
+ | /* | ||
+ | * tables will be created as ' | ||
+ | */ | ||
+ | |||
+ | $axmls-> | ||
+ | |||
+ | /* | ||
+ | * tables will be created as ' | ||
+ | */ | ||
+ | </ | ||
+ | |||
+ | ===== Note ===== | ||
+ | Some database restrict the length of table and index names. Ensure that the total length of prefix + table name does not exceed that limit. | ||
v5/axmls/setprefix.1450486561.txt.gz · Last modified: 2017/04/21 11:22 (external edit)