ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:changetablesql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:dictionary:changetablesql [2016/03/20 23:33] – [Usage] mnewnhamv5:dictionary:changetablesql [2025/05/05 01:23] (current) – [$dropColumns] mnewnham
Line 26: Line 26:
 </WRAP> </WRAP>
 ==== $fields ==== ==== $fields ====
-A string holding information regarding the columns to create in the new table. For a detailed description of the format of this string, see [[v5:dictionary:addcolumnsql|addColumnSql()]].+A string holding information regarding the columns to create in the new table. For a detailed description of the format of this string, see [[v5:dictionary:column_attributes]].
 ==== $tableOptions ==== ==== $tableOptions ====
 An optional array of information that adds information regarding the table creation. This array may also contain field specific information, for example information pertaining to auto-increment fields. An optional array of information that adds information regarding the table creation. This array may also contain field specific information, for example information pertaining to auto-increment fields.
 ==== $dropColumns ==== ==== $dropColumns ====
-By default, any columns not specified in the ''$fields'' parameter are not changed. If the value of ''$dropColumns'' is set to true, then any column not specified in that value will be dropped.+By default, any columns not specified in the ''$fields'' parameter are not changed. If the value of ''$dropColumns'' is set to true, then any column not specified in that value will be dropped. The assumption when using this parameter is that you have you have provided the entire table specification. If you have not, then you may cause serious problems in the table.
 ===== Usage ===== ===== Usage =====
 <code php> <code php>
Line 44: Line 44:
  
 $flds = "  $flds = " 
-   COL1 C(60) NOTNULL DEFAULT 'abc',+   COL1 C(60) NOTNULL DEFAULT 'abc'
   ";   ";
  
v5/dictionary/changetablesql.1458513207.txt.gz · Last modified: 2017/04/21 11:29 (external edit)