v5:dictionary:createindexsql
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dictionary:createindexsql [2015/08/29 03:09] – created mnewnham | v5:dictionary:createindexsql [2016/01/13 02:06] (current) – ↷ Links adapted because of a move operation mnewnham | ||
---|---|---|---|
Line 14: | Line 14: | ||
- | In order to actually create the column, the returned array must be passed to the [[dictionary: | + | In order to actually create the index, the returned array must be passed to the [[v5:dictionary:executesqlarray|executeSqlArray()]] method. |
===== Parameters ===== | ===== Parameters ===== | ||
Line 28: | Line 28: | ||
or as a numeric array: | or as a numeric array: | ||
<code php> | <code php> | ||
- | $fields = array(' | + | $fields = array(' |
</ | </ | ||
In databases that support partial column indexing, the columns can be passed as '' | In databases that support partial column indexing, the columns can be passed as '' | ||
==== $indexOptions ==== | ==== $indexOptions ==== | ||
- | An array of possible options to creating the index. Some options are database specific. To create a unique index, pass the array (' | + | An array of possible options to creating the index. Some options are database specific. To create a unique index, pass the array '' |
===== Usage ===== | ===== Usage ===== | ||
<code php> | <code php> | ||
+ | |||
+ | $dict = NewDataDictionary($db); | ||
+ | $sqlarray = $dict-> | ||
+ | print_r($sqlarray); | ||
+ | /* | ||
+ | * prints | ||
+ | * | ||
+ | Array | ||
+ | ( | ||
+ | [0] => CREATE INDEX SALESIDX ON ACT (ACTMAXSALE, | ||
+ | ) | ||
+ | */ | ||
</ | </ | ||
- | |||
- | ===== Usage ===== | ||
- | <code php> | ||
- | |||
- | </ |
v5/dictionary/createindexsql.1440810562.txt.gz · Last modified: 2017/04/21 11:28 (external edit)