v5:dictionary:renametablesql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dictionary:renametablesql [2015/08/27 02:48] – mnewnham | v5:dictionary:renametablesql [2016/01/13 02:06] (current) – ↷ Links adapted because of a move operation mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
~~NOTOC~~ | ~~NOTOC~~ | ||
<WRAP right box> | <WRAP right box> | ||
== See Also == | == See Also == | ||
- | [[dictionary: | + | [[v5:dictionary: |
== Syntax == | == Syntax == | ||
- | array dropTableSql | + | array renameTableSql |
- | string $tableName, | + | string $oldTableName, |
+ | string $newTableName | ||
) | ) | ||
</ | </ | ||
===== Description ===== | ===== Description ===== | ||
- | The method '' | + | The method '' |
===== Parameters ===== | ===== Parameters ===== | ||
- | ==== $tableName | + | ==== $oldTableName |
- | The table name must not yet exist in the database. Names must conform to any database specific requirements such as length limitations and name casing. | + | The table name must already exist in the database. |
+ | ==== $newTableName ==== | ||
+ | The new table name must not yet exist in the database. Names must conform to any database specific requirements such as length limitations and name casing. | ||
===== Usage ===== | ===== Usage ===== | ||
<code php> | <code php> | ||
Line 24: | Line 26: | ||
$dict = NewDataDictionary($db); | $dict = NewDataDictionary($db); | ||
- | $tabname | + | $oldTableName |
+ | $newTableName = ' | ||
/* | /* | ||
* create the SQL statement necessary to drop the table and its columns | * create the SQL statement necessary to drop the table and its columns | ||
*/ | */ | ||
- | $sqlarray = $dict->dropTableSql($tabname); | + | $sqlarray = $dict->renameTableSql($oldTableName, |
/* | /* | ||
Line 35: | Line 38: | ||
Array | Array | ||
( | ( | ||
- | | + | [0] => RENAME |
) | ) | ||
*/ | */ | ||
/* | /* | ||
- | * This statement actually | + | * This statement actually |
*/ | */ | ||
$dict-> | $dict-> | ||
</ | </ | ||
- |
v5/dictionary/renametablesql.txt · Last modified: 2016/01/13 02:06 by mnewnham