v5:dictionary:executesqlarray
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dictionary:executesqlarray [2015/08/26 00:47] – created mnewnham | v5:dictionary:executesqlarray [2016/01/13 02:06] (current) – ↷ Links adapted because of a move operation mnewnham | ||
---|---|---|---|
Line 8: | Line 8: | ||
</ | </ | ||
===== Description ===== | ===== Description ===== | ||
- | The method '' | + | The method '' |
+ | |||
+ | The statements are executed within the scope of a single transaction. | ||
===== Usage ===== | ===== Usage ===== | ||
+ | |||
<code php> | <code php> | ||
+ | /* | ||
+ | * create a data dictionary object, using the database connection | ||
+ | */ | ||
+ | $dict = NewDataDictionary($db); | ||
+ | |||
+ | $tabname = " | ||
+ | /* | ||
+ | * Change the length of COL1 from 32 chars to 60 | ||
+ | */ | ||
+ | |||
+ | $flds = " | ||
+ | COL1 C(60) NOTNULL DEFAULT ' | ||
+ | "; | ||
+ | |||
+ | /* | ||
+ | * create the SQL statement necessary to modify the column | ||
+ | */ | ||
+ | $sqlarray = $dict-> | ||
+ | |||
+ | /* | ||
+ | * This statement actually changes the table | ||
+ | */ | ||
+ | $db-> | ||
+ | $dict-> | ||
+ | $db-> | ||
</ | </ | ||
+ |
v5/dictionary/executesqlarray.1440542864.txt.gz · Last modified: 2017/04/21 11:28 (external edit)