mydatabasepilot-cvs Mailing List for MyDatabase Pilot (Page 3)
Status: Alpha
Brought to you by:
nanoface
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(3) |
Apr
(40) |
May
(50) |
Jun
(61) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <nan...@us...> - 2003-06-13 18:55:48
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv32432/dbProcessInit Modified Files: AddField.cfm Log Message: [ 754163 ] Removed Evalute Dynamic Functions from dbProcessBody/AddField.cfm Now using #alterSpec[i].colType# syntax opposed to #Evaluate("FORM.fieldType#i#")# Renamed valueList to legalValues and Renamed default to defaultValue to prevent CF language conflicts Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AddField.cfm 13 Jun 2003 15:47:51 -0000 1.8 --- AddField.cfm 13 Jun 2003 18:55:45 -0000 1.9 *************** *** 33,39 **** <cfparam name="FORM.fieldType#i#" default="" /> <cfparam name="FORM.length#i#" default="" /> ! <cfparam name="FORM.valueList#i#" default="" /> <cfparam name="FORM.numberOfDecimals#i#" default="" /> ! <cfparam name="FORM.default#i#" default="" /> <!---||| Create Structre and Keys |||---> --- 33,39 ---- <cfparam name="FORM.fieldType#i#" default="" /> <cfparam name="FORM.length#i#" default="" /> ! <cfparam name="FORM.legalValues#i#" default="" /> <cfparam name="FORM.numberOfDecimals#i#" default="" /> ! <cfparam name="FORM.defaultValue#i#" default="" /> <!---||| Create Structre and Keys |||---> *************** *** 46,49 **** --- 46,57 ---- <!--- Create Key "colType" ---> <cfset alterSpec[i].colType="#Evaluate("FORM.fieldType#i#")#" /> + <!--- Create Key "length" ---> + <cfset alterSpec[i].length="#Evaluate("FORM.length#i#")#" /> + <!--- Create Key "valueList" ---> + <cfset alterSpec[i].legalValues="#Evaluate("FORM.legalValues#i#")#" /> + <!--- Create Key "numberOfDecimals" ---> + <cfset alterSpec[i].numberOfDecimals="#Evaluate("FORM.numberOfDecimals#i#")#" /> + <!--- Create Key "defaultValue" ---> + <cfset alterSpec[i].defaultValue="#Evaluate("FORM.defaultValue#i#")#" /> </cfloop> |
From: <nan...@us...> - 2003-06-13 18:55:48
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv32432/dbProcessBody Modified Files: AddField.cfm Log Message: [ 754163 ] Removed Evalute Dynamic Functions from dbProcessBody/AddField.cfm Now using #alterSpec[i].colType# syntax opposed to #Evaluate("FORM.fieldType#i#")# Renamed valueList to legalValues and Renamed default to defaultValue to prevent CF language conflicts Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AddField.cfm 13 Jun 2003 15:47:51 -0000 1.10 --- AddField.cfm 13 Jun 2003 18:55:44 -0000 1.11 *************** *** 266,275 **** <td valign="middle"> <!---||| Show Available Field Options Based on Selected Field Type |||---> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> <!---||| VARCHAR and CHAR Options |||---> <cfcase value="VARCHAR,CHAR"> <!--- Show Lenght Option, set value to previous request if it exists ---> <!--- Make sure it is an interger between 0-255, set it to required ---> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="3" maxlength="3" range="0,255" required="yes" message="The legal range for length is 0-255. This is a required field. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> <!--- Show BINARY Option, set it to checked if already set on a previous request ---> <nobr> --- 266,275 ---- <td valign="middle"> <!---||| Show Available Field Options Based on Selected Field Type |||---> ! <cfswitch expression="#alterSpec[i].colType#"> <!---||| VARCHAR and CHAR Options |||---> <cfcase value="VARCHAR,CHAR"> <!--- Show Lenght Option, set value to previous request if it exists ---> <!--- Make sure it is an interger between 0-255, set it to required ---> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#alterSpec[i].length#" size="3" maxlength="3" range="0,255" required="yes" message="The legal range for length is 0-255. This is a required field. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> <!--- Show BINARY Option, set it to checked if already set on a previous request ---> <nobr> *************** *** 308,313 **** <cfcase value="ENUM,SET"> <!--- Show "Value List" Option, set value to previous request if it exists ---> ! <label for="valueList#i#" class="Fancy">Value List:<br />Enter Each Value on a New Line</label><br /> ! <textarea name="valueList#i#" cols="20" rows="5" class="Fancy">#Evaluate("FORM.valueList#i#")#</textarea> <br /> --- 308,313 ---- <cfcase value="ENUM,SET"> <!--- Show "Value List" Option, set value to previous request if it exists ---> ! <label for="legalValues#i#" class="Fancy">Value List:<br />Enter Each Value on a New Line</label><br /> ! <textarea name="legalValues#i#" cols="20" rows="5" class="Fancy">#alterSpec[i].legalValues#</textarea> <br /> *************** *** 327,331 **** <!--- Show "Length" Option, set value to previous request if it exists ---> <!--- Make sure it is an interger between 1-20, set it to not required ---> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="2" maxlength="2" range="1,20" required="no" message="The legal range for length is 1-20 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> <!--- Show AUTO_INCREMENT Option, set it to checked if already set on a previous request ---> <nobr> --- 327,331 ---- <!--- Show "Length" Option, set value to previous request if it exists ---> <!--- Make sure it is an interger between 1-20, set it to not required ---> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#alterSpec[i].length#" size="2" maxlength="2" range="1,20" required="no" message="The legal range for length is 1-20 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> <!--- Show AUTO_INCREMENT Option, set it to checked if already set on a previous request ---> <nobr> *************** *** 373,379 **** <nobr> <label class="Fancy">(</label> ! <cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="2" maxlength="2" range="1,24" required="no" message="The legal range for length is 1-24 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /> <label class="Fancy">,</label> ! <cfinput name="numberOfDecimals#i#" type="text" value="#Evaluate("FORM.numberOfDecimals#i#")#" size="2" maxlength="2" range="1,24" required="no" message="The legal range for Number of Decimals is 1-24. Please correct this field for row number #i#." validate="integer" class="Fancy" /> <label class="Fancy">)</label> </nobr><br /> --- 373,379 ---- <nobr> <label class="Fancy">(</label> ! <cfinput name="length#i#" type="text" value="#alterSpec[i].length#" size="2" maxlength="2" range="1,24" required="no" message="The legal range for length is 1-24 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /> <label class="Fancy">,</label> ! <cfinput name="numberOfDecimals#i#" type="text" value="#alterSpec[i].numberOfDecimals#" size="2" maxlength="2" range="1,24" required="no" message="The legal range for Number of Decimals is 1-24. Please correct this field for row number #i#." validate="integer" class="Fancy" /> <label class="Fancy">)</label> </nobr><br /> *************** *** 411,424 **** <!--- Show "Length" Option if Data Type is TIMESTAMP, set value to previous request if it exists ---> <!--- Make sure it is an interger between 2-14, set it to not required ---> ! <cfif #Evaluate("FORM.fieldType#i#")# IS "TIMESTAMP"> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="2" maxlength="2" range="2,14" required="no" message="The legal range for Length is 2-14 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> </cfif> <!--- Show "Length" Option if Data Type is TIMESTAMP ---> <!--- Set value 2 to checked if already set on a previous request otherwise set value 4 to checked ---> ! <cfif #Evaluate("FORM.fieldType#i#")# IS "YEAR"> <nobr> <label class="Fancy">Length(</label> ! <cfif #Evaluate("FORM.length#i#")# IS 2> <cfinput name="length#i#" type="radio" value="2" checked="yes" /><label class="Fancy">2</label> <cfinput name="length#i#" type="radio" value="4" /><label class="Fancy">4</label> --- 411,424 ---- <!--- Show "Length" Option if Data Type is TIMESTAMP, set value to previous request if it exists ---> <!--- Make sure it is an interger between 2-14, set it to not required ---> ! <cfif #alterSpec[i].colType# IS "TIMESTAMP"> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#alterSpec[i].length#" size="2" maxlength="2" range="2,14" required="no" message="The legal range for Length is 2-14 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> </cfif> <!--- Show "Length" Option if Data Type is TIMESTAMP ---> <!--- Set value 2 to checked if already set on a previous request otherwise set value 4 to checked ---> ! <cfif #alterSpec[i].colType# IS "YEAR"> <nobr> <label class="Fancy">Length(</label> ! <cfif #alterSpec[i].length# IS 2> <cfinput name="length#i#" type="radio" value="2" checked="yes" /><label class="Fancy">2</label> <cfinput name="length#i#" type="radio" value="4" /><label class="Fancy">4</label> *************** *** 449,457 **** <!---||| Allow User to Enter a Default Value for the Field Unless fieldType is BLOB or TEXT |||---> <td> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> <label class="Fancy">BLOB and TEXT field types can not have default values.</label> </cfcase> ! <cfdefaultcase><cfinput name="default#i#" value="#Evaluate("FORM.default#i#")#" type="text" size="20" required="no" class="Fancy" /></cfdefaultcase> </cfswitch> </td> --- 449,457 ---- <!---||| Allow User to Enter a Default Value for the Field Unless fieldType is BLOB or TEXT |||---> <td> ! <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> <label class="Fancy">BLOB and TEXT field types can not have default values.</label> </cfcase> ! <cfdefaultcase><cfinput name="defaultValue#i#" value="#alterSpec[i].defaultValue#" type="text" size="20" required="no" class="Fancy" /></cfdefaultcase> </cfswitch> </td> *************** *** 461,465 **** <cfinput name="key#i#" type="radio" value="Primary" /><label class="Fancy">Primary</label><br /> <cfinput name="key#i#" type="radio" value="Unique" /><label class="Fancy">Unique</label><br /> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> <cfcase value="TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,VARCHAR"> <cfinput name="key#i#" type="radio" value="Fulltext" /><label class="Fancy">Fulltext</label><br /> --- 461,465 ---- <cfinput name="key#i#" type="radio" value="Primary" /><label class="Fancy">Primary</label><br /> <cfinput name="key#i#" type="radio" value="Unique" /><label class="Fancy">Unique</label><br /> ! <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,VARCHAR"> <cfinput name="key#i#" type="radio" value="Fulltext" /><label class="Fancy">Fulltext</label><br /> *************** *** 467,471 **** </cfswitch> <cfinput name="key#i#" type="radio" value="Index" /><label class="Fancy">Index</label> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,CHAR,VARCHAR"> Length() --- 467,471 ---- </cfswitch> <cfinput name="key#i#" type="radio" value="Index" /><label class="Fancy">Index</label> ! <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,CHAR,VARCHAR"> Length() *************** *** 487,492 **** <div class="Code"> <cfoutput> ! RAW: #rawOutput#<br /> ! HTML: #htmlOutput#<br /> </cfoutput> </div> --- 487,492 ---- <div class="Code"> <cfoutput> ! RAW:<br />#rawOutput#<br /> ! HTML:<br />#htmlOutput#<br /> </cfoutput> </div> |
From: <nan...@us...> - 2003-06-13 15:48:05
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv8443/dbProcessInit Modified Files: AddField.cfm Log Message: [ 754037 ] Moved Default FORM Values -length#i# -valueList#i# -numberOfDecimals#i# -default#i# From dbProcessBody/AddField.cfm To: dbProcessInit/AddField.cfm Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AddField.cfm 12 Jun 2003 04:39:50 -0000 1.7 --- AddField.cfm 13 Jun 2003 15:47:51 -0000 1.8 *************** *** 1,72 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!----------------------------------------------------> ! <!--- Get List of Field Names and Their Properties ---> ! <!----------------------------------------------------> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" /> ! ! <!-----------------------------------> ! <!--- Create alterSpec Definition ---> ! <!-----------------------------------> ! <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1) /> ! ! <!---||| Loop over each new field |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <!--- Create a Structure for each new field ---> ! <cfset alterSpec[i]=StructNew() /> ! <!--- Create Key "format" ---> ! <cfset alterSpec[i].format="ADD COLUMN" /> ! <!--- Create Key "colName" ---> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> ! <!--- Create Key "colType" ---> ! <cfparam name="FORM.fieldType#i#" default="" /> ! <cfset alterSpec[i].colType="#Evaluate("FORM.fieldType#i#")#" /> ! </cfloop> ! ! <!-------------------------------------------------> ! <!--- Invoke alterTable Custom Tag via CFModule ---> ! <!-------------------------------------------------> ! <!---||| If execution of Alter Table was requested by the form ... |||---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> --- 1,79 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!----------------------------------------------------> ! <!--- Get List of Field Names and Their Properties ---> ! <!----------------------------------------------------> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" /> ! ! <!-----------------------------------> ! <!--- Create alterSpec Definition ---> ! <!-----------------------------------> ! <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1) /> ! ! <!---||| Loop over each new field |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <!---||| Set default values of empty string for FORM fields |||---> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <cfparam name="FORM.fieldType#i#" default="" /> ! <cfparam name="FORM.length#i#" default="" /> ! <cfparam name="FORM.valueList#i#" default="" /> ! <cfparam name="FORM.numberOfDecimals#i#" default="" /> ! <cfparam name="FORM.default#i#" default="" /> ! ! <!---||| Create Structre and Keys |||---> ! <!--- Create a Structure for each new field ---> ! <cfset alterSpec[i]=StructNew() /> ! <!--- Create Key "format" ---> ! <cfset alterSpec[i].format="ADD COLUMN" /> ! <!--- Create Key "colName" ---> ! <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> ! <!--- Create Key "colType" ---> ! <cfset alterSpec[i].colType="#Evaluate("FORM.fieldType#i#")#" /> ! </cfloop> ! ! <!-------------------------------------------------> ! <!--- Invoke alterTable Custom Tag via CFModule ---> ! <!-------------------------------------------------> ! <!---||| If execution of Alter Table was requested by the form ... |||---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> |
From: <nan...@us...> - 2003-06-13 15:48:04
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv8443/dbProcessBody Modified Files: AddField.cfm Log Message: [ 754037 ] Moved Default FORM Values -length#i# -valueList#i# -numberOfDecimals#i# -default#i# From dbProcessBody/AddField.cfm To: dbProcessInit/AddField.cfm Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AddField.cfm 12 Jun 2003 04:34:42 -0000 1.9 --- AddField.cfm 13 Jun 2003 15:47:51 -0000 1.10 *************** *** 1,520 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessBody/AddField.cfm * ! * Purpose: Displays the Body Content for the AddField Database Process * ! * Requiremets: -fieldList Query must be run on same page prior to including this template * ! * -URL.table (table name) must have been passed from calling template * ! ********************************************************************************************---> ! ! <!---||| Initiate a Read Only lock to ensure the integrity of session variables |||---><cflock timeout = "30" throwontimeout="no" type = "readonly" scope = "session"> ! <!---||| Create AddField FORM |||---> [...1005 lines suppressed...] ! ! <!---||| Submit Request |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Run Alter Table Query</legend> ! <!---***Insert a query box of the SQL that is about to be executed***---> ! <input name="ExecuteAlterTable" type="submit" value="Add Fields as Defined Above"> ! </fieldset> ! </cfform> ! </cflock> ! ! ! ! ! <h3>Quick Reference Notes</h3> ! <ul> ! <li>Note that if you specify ZEROFILL for a column, MySQL will automatically add the UNSIGNED attribute to the column.</li> ! <li>BLOB and TEXT field types can not have default values.</li> ! <li>A DEFAULT value has to be a constant, it cannot be a function or an expression.</li> ! <li>When putting an index on a BLOB or TEXT column, you MUST always specify the length of the index.</li> </ul> |
From: <nan...@us...> - 2003-06-13 15:10:16
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv21055/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 753698 ] Query/AlterTable.cfm -Added Column Type -Started Type Options Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** alterTable.cfm 13 Jun 2003 02:39:06 -0000 1.3 --- alterTable.cfm 13 Jun 2003 15:10:12 -0000 1.4 *************** *** 74,96 **** <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>"> </cfif> </cfcase> <!--- ToDo Cases: ---> ! <!--- ADD INDEX ---> ! <!--- ADD PRIMARY KEY ---> ! <!--- ADD UNIQUE ---> ! <!--- ADD FULLTEXT ---> ! <!--- ADD FOREIGN KEY ---> ! <!--- ALTER COLUMN ---> ! <!--- CHANGE COLUMN ---> ! <!--- MODIFY COLUMN ---> ! <!--- DROP COLUMN ---> ! <!--- DROP PRIMARY KEY ---> ! <!--- DROP INDEX ---> ! <!--- DISABLE KEYS ---> ! <!--- ENABLE KEYS ---> ! <!--- RENAME TO ---> ! <!--- ORDER BY ---> ! <!--- table_options ---> </cfswitch> </cfloop> --- 74,135 ---- <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>"> + <!--- Type Options ---> + <cfswitch expression="#ATTRIBUTES.alterSpec[i].colType#"> + <cfcase value="VARCHAR,CHAR"></cfcase> + <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"></cfcase> + <cfcase value="ENUM,SET"></cfcase> + <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT"></cfcase> + <cfcase value="FLOAT,DOUBLE,DECIMAL"></cfcase> + <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"></cfcase> + + <!--- + TINYINT[(length)] [UNSIGNED] [ZEROFILL] + or SMALLINT[(length)] [UNSIGNED] [ZEROFILL] + or MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] + or INT[(length)] [UNSIGNED] [ZEROFILL] + or INTEGER[(length)] [UNSIGNED] [ZEROFILL] + or BIGINT[(length)] [UNSIGNED] [ZEROFILL] + or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] + or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] + or FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] + or DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] + or NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] + or CHAR(length) [BINARY] + or VARCHAR(length) [BINARY] + or DATE + or TIME + or TIMESTAMP + or DATETIME + or TINYBLOB + or BLOB + or MEDIUMBLOB + or LONGBLOB + or TINYTEXT + or TEXT + or MEDIUMTEXT + or LONGTEXT + or ENUM(value1,value2,value3,...) + or SET(value1,value2,value3,...) + ---> + </cfswitch> </cfif> </cfcase> <!--- ToDo Cases: ---> ! <cfcase value="ADD INDEX"></cfcase> ! <cfcase value="ADD PRIMARY KEY"></cfcase> ! <cfcase value="ADD UNIQUE"></cfcase> ! <cfcase value="ADD FULLTEXT"></cfcase> ! <cfcase value="ADD FOREIGN KEY"></cfcase> ! <cfcase value="ALTER COLUMN"></cfcase> ! <cfcase value="CHANGE COLUMN"></cfcase> ! <cfcase value="MODIFY COLUMN"></cfcase> ! <cfcase value="DROP COLUMN"></cfcase> ! <cfcase value="DROP PRIMARY KEY"></cfcase> ! <cfcase value="DROP INDEX"></cfcase> ! <cfcase value="DISABLE KEYS"></cfcase> ! <cfcase value="ENABLE KEYS"></cfcase> ! <cfcase value="RENAME TO"></cfcase> ! <cfcase value="ORDER BY"></cfcase> ! <cfcase value="table_options"></cfcase> </cfswitch> </cfloop> |
From: <nan...@us...> - 2003-06-13 02:39:11
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv3121/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 753698 ] Query/AlterTable.cfm -Added Column Type -Started Type Options Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** alterTable.cfm 12 Jun 2003 03:49:22 -0000 1.2 --- alterTable.cfm 13 Jun 2003 02:39:06 -0000 1.3 *************** *** 68,72 **** <!--- Column Type ---> ! </cfcase> <!--- ToDo Cases: ---> --- 68,78 ---- <!--- Column Type ---> ! <cfif ATTRIBUTES.alterSpec[i].colType IS "" OR ATTRIBUTES.alterSpec[i].colType IS "Empty"> ! <cfset rawSQL = "#rawSQL# DataTypeNotSpecified_#i#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">DataTypeNotSpecified_#i#</span>"> ! <cfelse> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>"> ! </cfif> </cfcase> <!--- ToDo Cases: ---> |
From: <nan...@us...> - 2003-06-12 04:39:53
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv20183/dbProcessInit Modified Files: AddField.cfm Log Message: Added a few comments Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AddField.cfm 12 Jun 2003 04:34:42 -0000 1.6 --- AddField.cfm 12 Jun 2003 04:39:50 -0000 1.7 *************** *** 31,37 **** --- 31,40 ---- <!--- Create a Structure for each new field ---> <cfset alterSpec[i]=StructNew() /> + <!--- Create Key "format" ---> <cfset alterSpec[i].format="ADD COLUMN" /> + <!--- Create Key "colName" ---> <cfparam name="FORM.fieldName#i#" default="" /> <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> + <!--- Create Key "colType" ---> <cfparam name="FORM.fieldType#i#" default="" /> <cfset alterSpec[i].colType="#Evaluate("FORM.fieldType#i#")#" /> |
From: <nan...@us...> - 2003-06-12 04:34:46
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv17649/dbProcessInit Modified Files: AddField.cfm Log Message: Internal Structure Changed: [ 753072 ] Moved FORM.fieldType#i# default setting From: dbProcessBody/AddField.cfm To: dbProcessInit/AddField.cfm Also changed value of select field fieldType#i# From: #Evaluate("FORM.fieldType#i#")# To: alterSpec[i].colType Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AddField.cfm 12 Jun 2003 03:43:34 -0000 1.5 --- AddField.cfm 12 Jun 2003 04:34:42 -0000 1.6 *************** *** 1,67 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!----------------------------------------------------> ! <!--- Get List of Field Names and Their Properties ---> ! <!----------------------------------------------------> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" /> ! ! <!-----------------------------------> ! <!--- Create alterSpec Definition ---> ! <!-----------------------------------> ! <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1) /> ! ! <!---||| Loop over each new field |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <!--- Create a Structure for each new field ---> ! <cfset alterSpec[i]=StructNew() /> ! <cfset alterSpec[i].format="ADD COLUMN" /> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> ! </cfloop> ! ! <!-------------------------------------------------> ! <!--- Invoke alterTable Custom Tag via CFModule ---> ! <!-------------------------------------------------> ! <!---||| If execution of Alter Table was requested by the form ... |||---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> --- 1,69 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!----------------------------------------------------> ! <!--- Get List of Field Names and Their Properties ---> ! <!----------------------------------------------------> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" /> ! ! <!-----------------------------------> ! <!--- Create alterSpec Definition ---> ! <!-----------------------------------> ! <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1) /> ! ! <!---||| Loop over each new field |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <!--- Create a Structure for each new field ---> ! <cfset alterSpec[i]=StructNew() /> ! <cfset alterSpec[i].format="ADD COLUMN" /> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> ! <cfparam name="FORM.fieldType#i#" default="" /> ! <cfset alterSpec[i].colType="#Evaluate("FORM.fieldType#i#")#" /> ! </cfloop> ! ! <!-------------------------------------------------> ! <!--- Invoke alterTable Custom Tag via CFModule ---> ! <!-------------------------------------------------> ! <!---||| If execution of Alter Table was requested by the form ... |||---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> |
From: <nan...@us...> - 2003-06-12 04:34:46
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv17649/dbProcessBody Modified Files: AddField.cfm Log Message: Internal Structure Changed: [ 753072 ] Moved FORM.fieldType#i# default setting From: dbProcessBody/AddField.cfm To: dbProcessInit/AddField.cfm Also changed value of select field fieldType#i# From: #Evaluate("FORM.fieldType#i#")# To: alterSpec[i].colType Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AddField.cfm 11 Jun 2003 04:10:37 -0000 1.8 --- AddField.cfm 12 Jun 2003 04:34:42 -0000 1.9 *************** *** 69,74 **** <!---||| Allow User to Specify the Fields Name |||---> - <!--- Set a default value of empty string ---> - <cfparam name="FORM.fieldType#i#" default="" /> <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> <td> --- 69,72 ---- *************** *** 79,83 **** <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> <!--- Check to see if empty option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS ""> <option value="Empty" selected class="Fancy"></option> <cfelse> --- 77,81 ---- <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> <!--- Check to see if empty option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS ""> <option value="Empty" selected class="Fancy"></option> <cfelse> *************** *** 86,90 **** <optgroup label="String" class="Fancy"> <!--- Check to see if VARCHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "VARCHAR"> <option value="VARCHAR" selected class="Fancy">VARCHAR(m)</option> <cfelse> --- 84,88 ---- <optgroup label="String" class="Fancy"> <!--- Check to see if VARCHAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "VARCHAR"> <option value="VARCHAR" selected class="Fancy">VARCHAR(m)</option> <cfelse> *************** *** 93,97 **** <!--- Check to see if CHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "CHAR"> <option value="CHAR" selected class="Fancy">CHAR(m)</option> <cfelse> --- 91,95 ---- <!--- Check to see if CHAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "CHAR"> <option value="CHAR" selected class="Fancy">CHAR(m)</option> <cfelse> *************** *** 100,104 **** <!--- Check to see if TINYBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYBLOB"> <option value="TINYBLOB" selected class="Fancy">TINYBLOB</option> <cfelse> --- 98,102 ---- <!--- Check to see if TINYBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYBLOB"> <option value="TINYBLOB" selected class="Fancy">TINYBLOB</option> <cfelse> *************** *** 107,111 **** <!--- Check to see if BLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BLOB"> <option value="BLOB" selected class="Fancy">BLOB</option> <cfelse> --- 105,109 ---- <!--- Check to see if BLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "BLOB"> <option value="BLOB" selected class="Fancy">BLOB</option> <cfelse> *************** *** 114,118 **** <!--- Check to see if MEDIUMBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMBLOB"> <option value="MEDIUMBLOB" selected class="Fancy">MEDIUMBLOB</option> <cfelse> --- 112,116 ---- <!--- Check to see if MEDIUMBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMBLOB"> <option value="MEDIUMBLOB" selected class="Fancy">MEDIUMBLOB</option> <cfelse> *************** *** 121,125 **** <!--- Check to see if LONGBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGBLOB"> <option value="LONGBLOB" selected class="Fancy">LONGBLOB</option> <cfelse> --- 119,123 ---- <!--- Check to see if LONGBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "LONGBLOB"> <option value="LONGBLOB" selected class="Fancy">LONGBLOB</option> <cfelse> *************** *** 128,132 **** <!--- Check to see if TINYTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYTEXT"> <option value="TINYTEXT" selected class="Fancy">TINYTEXT</option> <cfelse> --- 126,130 ---- <!--- Check to see if TINYTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYTEXT"> <option value="TINYTEXT" selected class="Fancy">TINYTEXT</option> <cfelse> *************** *** 135,139 **** <!--- Check to see if TEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TEXT"> <option value="TEXT" selected class="Fancy">TEXT</option> <cfelse> --- 133,137 ---- <!--- Check to see if TEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TEXT"> <option value="TEXT" selected class="Fancy">TEXT</option> <cfelse> *************** *** 142,146 **** <!--- Check to see if MEDIUMTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMTEXT"> <option value="MEDIUMTEXT" selected class="Fancy">MEDIUMTEXT</option> <cfelse> --- 140,144 ---- <!--- Check to see if MEDIUMTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMTEXT"> <option value="MEDIUMTEXT" selected class="Fancy">MEDIUMTEXT</option> <cfelse> *************** *** 149,153 **** <!--- Check to see if LONGTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGTEXT"> <option value="LONGTEXT" selected class="Fancy">LONGTEXT</option> <cfelse> --- 147,151 ---- <!--- Check to see if LONGTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "LONGTEXT"> <option value="LONGTEXT" selected class="Fancy">LONGTEXT</option> <cfelse> *************** *** 156,160 **** <!--- Check to see if ENUM option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "ENUM"> <option value="ENUM" selected class="Fancy">ENUM(v1,v2,...)</option> <cfelse> --- 154,158 ---- <!--- Check to see if ENUM option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "ENUM"> <option value="ENUM" selected class="Fancy">ENUM(v1,v2,...)</option> <cfelse> *************** *** 163,167 **** <!--- Check to see if SET option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SET"> <option value="SET" selected class="Fancy">SET(v1,v2,...)</option> <cfelse> --- 161,165 ---- <!--- Check to see if SET option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "SET"> <option value="SET" selected class="Fancy">SET(v1,v2,...)</option> <cfelse> *************** *** 171,175 **** <optgroup label="Numeric" class="Fancy"> <!--- Check to see if TINYINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYINT"> <option value="TINYINT" selected class="Fancy">TINYINT(m)</option> <cfelse> --- 169,173 ---- <optgroup label="Numeric" class="Fancy"> <!--- Check to see if TINYINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYINT"> <option value="TINYINT" selected class="Fancy">TINYINT(m)</option> <cfelse> *************** *** 178,182 **** <!--- Check to see if SMALLINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SMALLINT"> <option value="SMALLINT" selected class="Fancy">SMALLINT(m)</option> <cfelse> --- 176,180 ---- <!--- Check to see if SMALLINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "SMALLINT"> <option value="SMALLINT" selected class="Fancy">SMALLINT(m)</option> <cfelse> *************** *** 185,189 **** <!--- Check to see if MEDIUMINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMINT"> <option value="MEDIUMINT" selected class="Fancy">MEDIUMINT(m)</option> <cfelse> --- 183,187 ---- <!--- Check to see if MEDIUMINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMINT"> <option value="MEDIUMINT" selected class="Fancy">MEDIUMINT(m)</option> <cfelse> *************** *** 192,196 **** <!--- Check to see if INT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "INT"> <option value="INT" selected class="Fancy">INT(m)</option> <cfelse> --- 190,194 ---- <!--- Check to see if INT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "INT"> <option value="INT" selected class="Fancy">INT(m)</option> <cfelse> *************** *** 199,203 **** <!--- Check to see if BIGINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BIGINT"> <option value="BIGINT" selected class="Fancy">BIGINT(m)</option> <cfelse> --- 197,201 ---- <!--- Check to see if BIGINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "BIGINT"> <option value="BIGINT" selected class="Fancy">BIGINT(m)</option> <cfelse> *************** *** 206,210 **** <!--- Check to see if FLOAT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "FLOAT"> <option value="FLOAT" selected class="Fancy">FLOAT(m,d)</option> <cfelse> --- 204,208 ---- <!--- Check to see if FLOAT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "FLOAT"> <option value="FLOAT" selected class="Fancy">FLOAT(m,d)</option> <cfelse> *************** *** 213,217 **** <!--- Check to see if DOUBLE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DOUBLE"> <option value="DOUBLE" selected class="Fancy">DOUBLE(m,d)</option> <cfelse> --- 211,215 ---- <!--- Check to see if DOUBLE option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DOUBLE"> <option value="DOUBLE" selected class="Fancy">DOUBLE(m,d)</option> <cfelse> *************** *** 220,224 **** <!--- Check to see if DECIMAL option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DECIMAL"> <option value="DECIMAL" selected class="Fancy">DECIMAL(m,d)</option> <cfelse> --- 218,222 ---- <!--- Check to see if DECIMAL option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DECIMAL"> <option value="DECIMAL" selected class="Fancy">DECIMAL(m,d)</option> <cfelse> *************** *** 228,232 **** <optgroup label="Date Time" class="Fancy"> <!--- Check to see if DATE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATE"> <option value="DATE" selected class="Fancy">DATE</option> <cfelse> --- 226,230 ---- <optgroup label="Date Time" class="Fancy"> <!--- Check to see if DATE option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DATE"> <option value="DATE" selected class="Fancy">DATE</option> <cfelse> *************** *** 235,239 **** <!--- Check to see if TIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIME"> <option value="TIME" selected class="Fancy">TIME</option> <cfelse> --- 233,237 ---- <!--- Check to see if TIME option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TIME"> <option value="TIME" selected class="Fancy">TIME</option> <cfelse> *************** *** 242,246 **** <!--- Check to see if DATETIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATETIME"> <option value="DATETIME" selected class="Fancy">DATETIME</option> <cfelse> --- 240,244 ---- <!--- Check to see if DATETIME option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DATETIME"> <option value="DATETIME" selected class="Fancy">DATETIME</option> <cfelse> *************** *** 249,253 **** <!--- Check to see if YEAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "YEAR"> <option value="YEAR" selected class="Fancy">YEAR</option> <cfelse> --- 247,251 ---- <!--- Check to see if YEAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "YEAR"> <option value="YEAR" selected class="Fancy">YEAR</option> <cfelse> *************** *** 256,260 **** <!--- Check to see if TIMESTAMP option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIMESTAMP"> <option value="TIMESTAMP" selected class="Fancy">TIMESTAMP(m)</option> <cfelse> --- 254,258 ---- <!--- Check to see if TIMESTAMP option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TIMESTAMP"> <option value="TIMESTAMP" selected class="Fancy">TIMESTAMP(m)</option> <cfelse> *************** *** 510,513 **** --- 508,512 ---- </cfform> </cflock> + |
From: <nan...@us...> - 2003-06-12 04:06:41
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Styles In directory sc8-pr-cvs1:/tmp/cvs-serv5964/Styles Modified Files: master.css Log Message: Cosmetic Change: [ 753063 ] Added Class "Missing" to CSS Index: master.css =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Styles/master.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** master.css 5 Jun 2003 03:34:52 -0000 1.3 --- master.css 12 Jun 2003 04:06:38 -0000 1.4 *************** *** 1,117 **** ! /*Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license*/ ! ! /*=== IDs ===*/ ! /* None for now */ ! ! /*=== Default Formating ===*/ ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{font-size:14px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{color: #000000;} ! body{background:#CCCCFF; margin:0px; padding:0px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,address,noscript{font-family: "Times New Roman", Times, serif;} ! code,pre,tt {font-family: courier,sans-serif} ! blockquote,q{font-family: Arial, Helvetica, sans-serif;} ! ! /*=== Paragraph Formating ===*/ ! p{text-align:justify; text-indent:30px;} ! p:first-letter{font-size:16px; font-style:oblique; font-weight:bold;} ! p.Plain, p:first-letter.Plain{text-indent: 0px; font: normal normal 14px;} ! ! /*=== Headings ===*/ ! h1, h2, h3, h4, h5, h6{ ! font-family: serif, Geneva, sans-serif, Arial, Helvetica; ! color: #330066; ! background-color : #9999CC; ! font-weight : bold; ! font-style : italic; ! padding : 3px; ! margin-bottom : 3px; ! margin-top : 3px; ! } ! h1{font-size : 26px;border : ridge;text-align: center;} ! h2{text-indent : 5px;font-size : 23px;} ! h3{text-indent : 30px;font-size : 20px;} ! h4{text-indent :55px;font-size : 18px;} ! h5{text-indent : 80px;font-size : 16px;} ! H6{text-indent : 105px;font-size : 14px;} ! ! /*=== Links ===*/ ! a{font-weight: inherit; font-size : inherit; font-family : inherit;} ! a:Link{color : #0066CC;} ! a:Visited{color : #9900CC;} ! a:Link, a:Visited{text-decoration: none;background-color : #FFFFCC;} ! a:Hover, a:Visited:Hover{color: #990000;text-decoration: underline;background-color : #FFFF99;} ! a:Active{color:#FF0000;text-decoration: underline;background-color : #FFFF99;} ! ! /*=== Forms ===*/ ! form,label,input,select,optgroup,option,textarea,fieldset,legend,button{ ! font-size : 11pt; ! font-family : Arial, Helvetica, sans-serif; ! } ! ! /*=== General Classes ===*/ ! .ToDo{ ! background : #FF9900; ! color : #990066; ! font-size : 11pt; ! } ! .Warning{ ! background : #FF9900; ! color : #990066; ! font-size : 16pt; ! } ! ! .Bold{font-weight:bold;} ! .BoldCenter{font-weight:bold;text-align:center;} ! .Center{text-align:center} ! .Right{text-align:right;} ! ! /*=== Tag Specific Classes ===*/ ! tr.Head{background:#9999CC;} ! tr.Odd{background:#999966;} ! tr.Even{background:#CCCC99;} ! ! /* Code Blocks */ ! div.Code, pre.Code{ ! text-align : left; ! background-color : #FFFF99; ! color: #666666; ! margin : 5px 20px 5px 20px; ! font-family : "Courier New", Courier, monospace; ! padding : 5px 20px 5px 20px; ! font-size : 11pt; ! border: 1px dotted #FF0000; ! } ! ! span.Code,span.KeyWord,span.String{ ! background-color : #FFFF99; ! color: #666666; ! font-family : "Courier New", Courier, monospace; ! font-size : 11pt; ! } ! span.KeyWord{ ! font-weight: bold; ! color: #3366CC; ! } ! span.String{ ! font-weight: bold; ! color: #009900; ! } ! ! /* Fancy Form */ ! form.Fancy,fieldset.Fancy{ ! color : #000000; ! padding : 3px 3px 3px; ! border : 3px ridge; ! } ! form.Fancy{ ! background-color : #CCCC99; ! margin: 15px 15px 15px 15px; ! } ! fieldset.Fancy{margin: 5px 5px 5px 5px;} ! legend.Fancy{color: #660099;font : small-caps;letter-spacing: 4px;} ! label.Fancy,input.Fancy,select.Fancy,textarea.Fancy,button.Fancy,legend.Fancy{margin: 2px 2px 2px 2px;} ! label.Fancy{color: #663300;} ! input.Fancy,select.Fancy,optgroup.Fancy,option.Fancy,textarea.Fancy,button.Fancy{ ! background-color : #FFFFCC; ! color: #666666; } --- 1,113 ---- ! /*Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license*/ ! ! /*=== IDs ===*/ ! /* None for now */ ! ! /*=== Default Formating ===*/ ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{font-size:14px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{color: #000000;} ! body{background:#CCCCFF; margin:0px; padding:0px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,address,noscript{font-family: "Times New Roman", Times, serif;} ! code,pre,tt {font-family: courier,sans-serif} ! blockquote,q{font-family: Arial, Helvetica, sans-serif;} ! ! /*=== Paragraph Formating ===*/ ! p{text-align:justify; text-indent:30px;} ! p:first-letter{font-size:16px; font-style:oblique; font-weight:bold;} ! p.Plain, p:first-letter.Plain{text-indent: 0px; font: normal normal 14px;} ! ! /*=== Headings ===*/ ! h1, h2, h3, h4, h5, h6{ ! font-family: serif, Geneva, sans-serif, Arial, Helvetica; ! color: #330066; ! background-color : #9999CC; ! font-weight : bold; ! font-style : italic; ! padding : 3px; ! margin-bottom : 3px; ! margin-top : 3px; ! } ! h1{font-size : 26px;border : ridge;text-align: center;} ! h2{text-indent : 5px;font-size : 23px;} ! h3{text-indent : 30px;font-size : 20px;} ! h4{text-indent :55px;font-size : 18px;} ! h5{text-indent : 80px;font-size : 16px;} ! H6{text-indent : 105px;font-size : 14px;} ! ! /*=== Links ===*/ ! a{font-weight: inherit; font-size : inherit; font-family : inherit;} ! a:Link{color : #0066CC;} ! a:Visited{color : #9900CC;} ! a:Link, a:Visited{text-decoration: none;background-color : #FFFFCC;} ! a:Hover, a:Visited:Hover{color: #990000;text-decoration: underline;background-color : #FFFF99;} ! a:Active{color:#FF0000;text-decoration: underline;background-color : #FFFF99;} ! ! /*=== Forms ===*/ ! form,label,input,select,optgroup,option,textarea,fieldset,legend,button{ ! font-size : 11pt; ! font-family : Arial, Helvetica, sans-serif; ! } ! ! /*=== General Classes ===*/ ! .ToDo{ ! background : #FF9900; ! color : #990066; ! font-size : 11pt; ! } ! .Warning{ ! background : #FF9900; ! color : #990066; ! font-size : 16pt; ! } ! ! .Bold{font-weight:bold;} ! .BoldCenter{font-weight:bold;text-align:center;} ! .Center{text-align:center} ! .Right{text-align:right;} ! ! /*=== Tag Specific Classes ===*/ ! tr.Head{background:#9999CC;} ! tr.Odd{background:#999966;} ! tr.Even{background:#CCCC99;} ! ! /* Code Blocks */ ! div.Code, pre.Code{ ! text-align : left; ! background-color : #FFFF99; ! color: #666666; ! margin : 5px 20px 5px 20px; ! font-family : "Courier New", Courier, monospace; ! padding : 5px 20px 5px 20px; ! font-size : 11pt; ! border: 1px dotted #FF0000; ! } ! ! span.Code,span.KeyWord,span.String,span.Missing{ ! background-color : #FFFF99; ! font-family : "Courier New", Courier, monospace; ! font-size : 11pt; ! font-weight: bold; ! } ! span.Code{color: #666666;} ! span.KeyWord{color:#3366CC;} ! span.String{color:#009900;} ! span.Missing{color:#FF0000;text-decoration:underline;} ! ! /* Fancy Form */ ! form.Fancy,fieldset.Fancy{ ! color : #000000; ! padding : 3px 3px 3px; ! border : 3px ridge; ! } ! form.Fancy{ ! background-color : #CCCC99; ! margin: 15px 15px 15px 15px; ! } ! fieldset.Fancy{margin: 5px 5px 5px 5px;} ! legend.Fancy{color: #660099;font : small-caps;letter-spacing: 4px;} ! label.Fancy,input.Fancy,select.Fancy,textarea.Fancy,button.Fancy,legend.Fancy{margin: 2px 2px 2px 2px;} ! label.Fancy{color: #663300;} ! input.Fancy,select.Fancy,optgroup.Fancy,option.Fancy,textarea.Fancy,button.Fancy{ ! background-color : #FFFFCC; ! color: #666666; } |
From: <nan...@us...> - 2003-06-12 03:49:26
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv1177/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 753053 ] Started Alter Specification - Added "ADD COLUMN" case - Added column names Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** alterTable.cfm 5 Jun 2003 03:53:57 -0000 1.1 --- alterTable.cfm 12 Jun 2003 03:49:22 -0000 1.2 *************** *** 34,64 **** <!--- Generate ALTER TABLE Command Strings ---> <!--------------------------------------------> ! <!--- Initialize Internal Variables ---> <cfset rawSQL = "ALTER TABLE"> <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> ! <!--- Table Name ---> <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> ! <!--- alter_spec ---> ! <!--- ADD COLUMN ---> ! <!--- ADD INDEX ---> ! <!--- ADD PRIMARY KEY ---> ! <!--- ADD UNIQUE ---> ! <!--- ADD FULLTEXT ---> ! <!--- ADD FOREIGN KEY ---> ! <!--- ALTER COLUMN ---> ! <!--- CHANGE COLUMN ---> ! <!--- MODIFY COLUMN ---> ! <!--- DROP COLUMN ---> ! <!--- DROP PRIMARY KEY ---> ! <!--- DROP INDEX ---> ! <!--- DISABLE KEYS ---> ! <!--- ENABLE KEYS ---> ! <!--- RENAME TO ---> ! <!--- ORDER BY ---> ! <!--- table_options ---> </cfcase> --- 34,96 ---- <!--- Generate ALTER TABLE Command Strings ---> <!--------------------------------------------> ! <!---||| Initialize Internal Variables |||---> <cfset rawSQL = "ALTER TABLE"> <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> ! <!---||| Table Name |||---> <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> ! <!---||| Alter Specifications |||---> ! <!--- Process each Alter Specification ----> ! <cfloop from="1" to="#arrayLen(ATTRIBUTES.alterSpec)#" index="i"> ! <!--- If this is not the first alter specification add a comma to the last alterSpec ---> ! <cfif i GT 1> ! <cfset rawSQL = "#rawSQL#,"> ! <cfset htmlSQL = "#htmlSQL#,"> ! </cfif> ! ! <!--- Determine the alterSpec format ---> ! <cfswitch expression="#ATTRIBUTES.alterSpec[i].format#"> ! <cfcase value="ADD COLUMN"> ! <!--- ADD COLUMN KeyWord ---> ! <cfset rawSQL = "#rawSQL# ADD COLUMN"> ! <cfset htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD COLUMN</span>"> ! ! <!--- Column Name ---> ! <cfif ATTRIBUTES.alterSpec[i].colName IS ""> ! <cfset rawSQL = "#rawSQL# NameNotSpecified_#i#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#i#</span>"> ! <cfelse> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colName#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].colName#</span>"> ! </cfif> ! ! <!--- Column Type ---> ! ! </cfcase> ! <!--- ToDo Cases: ---> ! <!--- ADD INDEX ---> ! <!--- ADD PRIMARY KEY ---> ! <!--- ADD UNIQUE ---> ! <!--- ADD FULLTEXT ---> ! <!--- ADD FOREIGN KEY ---> ! <!--- ALTER COLUMN ---> ! <!--- CHANGE COLUMN ---> ! <!--- MODIFY COLUMN ---> ! <!--- DROP COLUMN ---> ! <!--- DROP PRIMARY KEY ---> ! <!--- DROP INDEX ---> ! <!--- DISABLE KEYS ---> ! <!--- ENABLE KEYS ---> ! <!--- RENAME TO ---> ! <!--- ORDER BY ---> ! <!--- table_options ---> ! </cfswitch> ! </cfloop> + <!---||| Terminate SQL Statement with Semicolon |||---> + <cfset rawSQL = "#rawSQL#;"> + <cfset htmlSQL = "#htmlSQL#;"> </cfcase> *************** *** 92,94 **** </cfif> </cfcase> ! </cfswitch> \ No newline at end of file --- 124,207 ---- </cfif> </cfcase> ! </cfswitch> ! ! <!---+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! === MySQL CREATE TABLE Syntax === ! ! ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...] ! ! alter_specification: ! ADD [COLUMN] create_definition [FIRST | AFTER column_name ] ! or ADD [COLUMN] (create_definition, create_definition,...) ! or ADD INDEX [index_name] (index_col_name,...) ! or ADD PRIMARY KEY (index_col_name,...) ! or ADD UNIQUE [index_name] (index_col_name,...) ! or ADD FULLTEXT [index_name] (index_col_name,...) ! or ADD [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} ! or CHANGE [COLUMN] old_col_name create_definition ! [FIRST | AFTER column_name] ! or MODIFY [COLUMN] create_definition [FIRST | AFTER column_name] ! or DROP [COLUMN] col_name ! or DROP PRIMARY KEY ! or DROP INDEX index_name ! or DISABLE KEYS ! or ENABLE KEYS ! or RENAME [TO] new_tbl_name ! or ORDER BY col ! or table_options ! ! create_definition: ! col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] ! [PRIMARY KEY] [reference_definition] ! or PRIMARY KEY (index_col_name,...) ! or KEY [index_name] (index_col_name,...) ! or INDEX [index_name] (index_col_name,...) ! or UNIQUE [INDEX] [index_name] (index_col_name,...) ! or FULLTEXT [INDEX] [index_name] (index_col_name,...) ! or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or CHECK (expr) ! ! type: ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! or SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! or MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! or INT[(length)] [UNSIGNED] [ZEROFILL] ! or INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! or BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! or NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! or CHAR(length) [BINARY] ! or VARCHAR(length) [BINARY] ! or DATE ! or TIME ! or TIMESTAMP ! or DATETIME ! or TINYBLOB ! or BLOB ! or MEDIUMBLOB ! or LONGBLOB ! or TINYTEXT ! or TEXT ! or MEDIUMTEXT ! or LONGTEXT ! or ENUM(value1,value2,value3,...) ! or SET(value1,value2,value3,...) ! ! index_col_name: ! col_name [(length)] ! ! reference_definition: ! REFERENCES tbl_name [(index_col_name,...)] ! [MATCH FULL | MATCH PARTIAL] ! [ON DELETE reference_option] ! [ON UPDATE reference_option] ! ! reference_option: ! RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---> \ No newline at end of file |
From: <nan...@us...> - 2003-06-12 03:43:37
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv32107/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 753049 ] Added alterSpec Attribute to CFMODULE tag and passed alterSpec Array to alterTable custom tag Also changed the structure key "type" to "format" Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AddField.cfm 11 Jun 2003 03:52:04 -0000 1.4 --- AddField.cfm 12 Jun 2003 03:43:34 -0000 1.5 *************** *** 1,65 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!----------------------------------------------------> ! <!--- Get List of Field Names and Their Properties ---> ! <!----------------------------------------------------> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" /> ! ! <!-----------------------------------> ! <!--- Create alterSpec Definition ---> ! <!-----------------------------------> ! <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1) /> ! ! <!---||| Loop over each new field |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <!--- Create a Structure for each new field ---> ! <cfset alterSpec[i]=StructNew() /> ! <cfset alterSpec[i].type="ADD COLUMN" /> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> ! </cfloop> ! ! <!-------------------------------------------------> ! <!--- Invoke alterTable Custom Tag via CFModule ---> ! <!-------------------------------------------------> ! <!---||| If execution of Alter Table was requested by the form ... |||---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> --- 1,67 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!----------------------------------------------------> ! <!--- Get List of Field Names and Their Properties ---> ! <!----------------------------------------------------> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" /> ! ! <!-----------------------------------> ! <!--- Create alterSpec Definition ---> ! <!-----------------------------------> ! <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1) /> ! ! <!---||| Loop over each new field |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <!--- Create a Structure for each new field ---> ! <cfset alterSpec[i]=StructNew() /> ! <cfset alterSpec[i].format="ADD COLUMN" /> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> ! </cfloop> ! ! <!-------------------------------------------------> ! <!--- Invoke alterTable Custom Tag via CFModule ---> ! <!-------------------------------------------------> ! <!---||| If execution of Alter Table was requested by the form ... |||---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! alterSpec="#alterSpec#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> |
From: <nan...@us...> - 2003-06-11 04:10:42
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv7517/dbProcessBody Modified Files: AddField.cfm Log Message: Internal Structure Changed: [ 752351 ] Moved FORM.fieldName#i# default setting From: dbProcessBody/AddField.cfm To: dbProcessInit/AddField.cfm Also changed value of input field fieldName#i# From: #Evaluate("FORM.fieldName#i#")# To: alterSpec[i].colName Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AddField.cfm 11 Jun 2003 03:05:04 -0000 1.7 --- AddField.cfm 11 Jun 2003 04:10:37 -0000 1.8 *************** *** 70,74 **** <!---||| Allow User to Specify the Fields Name |||---> <!--- Set a default value of empty string ---> - <cfparam name="FORM.fieldName#i#" default="" /> <cfparam name="FORM.fieldType#i#" default="" /> <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> --- 70,73 ---- *************** *** 76,80 **** <!--- Field Name ---> <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> ! <cfinput name="fieldName#i#" type="text" value="#Evaluate("FORM.fieldName#i#")#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /><br /> <!--- Field Type ---> <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> --- 75,79 ---- <!--- Field Name ---> <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> ! <cfinput name="fieldName#i#" type="text" value="#alterSpec[i].colName#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /><br /> <!--- Field Type ---> <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> |
From: <nan...@us...> - 2003-06-11 03:52:08
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv2313/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 752344 ] Created alterSpec Array of Structure In file dbProcessInit/AddField.cfm Created alterSpec Array of Structure - Created a Structure for each new field - Created Structure Key "type" - Created Structure Key "colName" Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AddField.cfm 11 Jun 2003 03:05:05 -0000 1.3 --- AddField.cfm 11 Jun 2003 03:52:04 -0000 1.4 *************** *** 11,15 **** <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!---||| Get List of Field Names and Their Properties |||---> <cfmodule template="../Query/fieldList.cfm" queryName="fieldList" --- 11,17 ---- <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!----------------------------------------------------> ! <!--- Get List of Field Names and Their Properties ---> ! <!----------------------------------------------------> <cfmodule template="../Query/fieldList.cfm" queryName="fieldList" *************** *** 17,29 **** username="#SESSION.userName#" password="#SESSION.password#" ! table="#URL.table#"> ! <!---||| Create alterSpec Definition |||---> <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1)> ! ! <!--- Loop over FORM ---> <!---||| If execution of Alter Table was requested by the form ... |||---> <cfif IsDefined("FORM.ExecuteAlterTable")> --- 19,42 ---- username="#SESSION.userName#" password="#SESSION.password#" ! table="#URL.table#" /> ! <!-----------------------------------> ! <!--- Create alterSpec Definition ---> ! <!-----------------------------------> <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1) /> + <!---||| Loop over each new field |||---> + <cfloop from="1" to="#FORM.numberOfFields#" index="i"> + <!--- Create a Structure for each new field ---> + <cfset alterSpec[i]=StructNew() /> + <cfset alterSpec[i].type="ADD COLUMN" /> + <cfparam name="FORM.fieldName#i#" default="" /> + <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> + </cfloop> + <!-------------------------------------------------> + <!--- Invoke alterTable Custom Tag via CFModule ---> + <!-------------------------------------------------> <!---||| If execution of Alter Table was requested by the form ... |||---> <cfif IsDefined("FORM.ExecuteAlterTable")> |
From: <nan...@us...> - 2003-06-11 03:05:09
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv22513/dbProcessInit Modified Files: AddField.cfm Log Message: Internal Structure Changed: [ 752338 ] Moved Set Default Values from : dbProcessBody/AddField.cfm to : dbProcessInit/AddField.cfm Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AddField.cfm 5 Jun 2003 04:08:50 -0000 1.2 --- AddField.cfm 11 Jun 2003 03:05:05 -0000 1.3 *************** *** 1,43 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!--- Get List of Field Names and Their Properties ---> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#"> ! ! <!--- Create alterSpec array or structures ---> ! ! <!--- If execution of Alter Table was requested by the form ... ---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> --- 1,52 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessInit/AddField.cfm * ! * Purpose: Initialize AddField Database Process * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! ! <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> ! <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!---||| Get List of Field Names and Their Properties |||---> ! <cfmodule template="../Query/fieldList.cfm" ! queryName="fieldList" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#"> ! ! <!---||| Create alterSpec Definition |||---> ! <!--- Create alterSpec one dimensional array ---> ! <cfset alterSpec=ArrayNew(1)> ! ! <!--- Loop over FORM ---> ! ! ! <!---||| If execution of Alter Table was requested by the form ... |||---> ! <cfif IsDefined("FORM.ExecuteAlterTable")> ! <!--- Get Generated SQL and execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" ! table="#URL.table#" ! execute="TRUE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Get Generated SQL, but do not execute it ---> ! <cfmodule template="../Query/alterTable.cfm" ! table="#URL.table#" ! execute="FALSE" ! sqlOutputType="BOTH" ! rawOutput="rawOutput" ! htmlOutput="htmlOutput"> ! </cfmodule> ! </cfif> </cflock> |
From: <nan...@us...> - 2003-06-11 03:05:08
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv22513/dbProcessBody Modified Files: AddField.cfm Log Message: Internal Structure Changed: [ 752338 ] Moved Set Default Values from : dbProcessBody/AddField.cfm to : dbProcessInit/AddField.cfm Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AddField.cfm 5 Jun 2003 04:20:54 -0000 1.6 --- AddField.cfm 11 Jun 2003 03:05:04 -0000 1.7 *************** *** 1,525 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessBody/AddField.cfm * ! * Purpose: Displays the Body Content for the AddField Database Process * ! * Requiremets: -fieldList Query must be run on same page prior to including this template * ! * -URL.table (table name) must have been passed from calling template * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> [...1018 lines suppressed...] ! </fieldset> ! ! <!---||| Submit Request |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Run Alter Table Query</legend> ! <!---***Insert a query box of the SQL that is about to be executed***---> ! <input name="ExecuteAlterTable" type="submit" value="Add Fields as Defined Above"> ! </fieldset> ! </cfform> ! </cflock> ! ! ! ! <h3>Quick Reference Notes</h3> ! <ul> ! <li>Note that if you specify ZEROFILL for a column, MySQL will automatically add the UNSIGNED attribute to the column.</li> ! <li>BLOB and TEXT field types can not have default values.</li> ! <li>A DEFAULT value has to be a constant, it cannot be a function or an expression.</li> ! <li>When putting an index on a BLOB or TEXT column, you MUST always specify the length of the index.</li> </ul> |
From: <nan...@us...> - 2003-06-05 04:20:57
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv16010/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 749313 ] Continued Development of dbProcessBody/AddField.cfm -Added Output of SQL Preview -Changed submit button name to ExecuteAlterTable Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AddField.cfm 1 Jun 2003 03:35:35 -0000 1.5 --- AddField.cfm 5 Jun 2003 04:20:54 -0000 1.6 *************** *** 498,501 **** --- 498,507 ---- <legend class="Fancy">SQL Preview</legend> Needs to be developed: Show Alter Table command that is about to be executed<br /> + <div class="Code"> + <cfoutput> + RAW: #rawOutput#<br /> + HTML: #htmlOutput#<br /> + </cfoutput> + </div> Create "Update SQL Preview" Button, to refresh Preview Box </fieldset> *************** *** 505,509 **** <legend class="Fancy">Run Alter Table Query</legend> <!---***Insert a query box of the SQL that is about to be executed***---> ! <input name="AddFields" type="submit" value="Add Fields as Defined Above"> </fieldset> </cfform> --- 511,515 ---- <legend class="Fancy">Run Alter Table Query</legend> <!---***Insert a query box of the SQL that is about to be executed***---> ! <input name="ExecuteAlterTable" type="submit" value="Add Fields as Defined Above"> </fieldset> </cfform> |
From: <nan...@us...> - 2003-06-05 04:08:53
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv12920/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 749311 ] Added Call to Custom Tag Query/alterTable.cfm - The call is either in execution mode or in view mode only, depending on how dbProcess "AddField" was called Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AddField.cfm 27 May 2003 04:03:14 -0000 1.1 --- AddField.cfm 5 Jun 2003 04:08:50 -0000 1.2 *************** *** 5,12 **** ********************************************************************************************---> - <!---||| Get List of Field Names and Their Properties |||---> <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!--- Invoke fieldList Custom Tag via CFModule ---> <cfmodule template="../Query/fieldList.cfm" queryName="fieldList" --- 5,11 ---- ********************************************************************************************---> <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> ! <!--- Get List of Field Names and Their Properties ---> <cfmodule template="../Query/fieldList.cfm" queryName="fieldList" *************** *** 15,17 **** --- 14,43 ---- password="#SESSION.password#" table="#URL.table#"> + + <!--- Create alterSpec array or structures ---> + + <!--- If execution of Alter Table was requested by the form ... ---> + <cfif IsDefined("FORM.ExecuteAlterTable")> + <!--- Get Generated SQL and execute it ---> + <cfmodule template="../Query/alterTable.cfm" + datasource="#SESSION.dataSource#" + username="#SESSION.userName#" + password="#SESSION.password#" + table="#URL.table#" + execute="TRUE" + sqlOutputType="BOTH" + rawOutput="rawOutput" + htmlOutput="htmlOutput"> + </cfmodule> + <!--- Otherwise ... ---> + <cfelse> + <!--- Get Generated SQL, but do not execute it ---> + <cfmodule template="../Query/alterTable.cfm" + table="#URL.table#" + execute="FALSE" + sqlOutputType="BOTH" + rawOutput="rawOutput" + htmlOutput="htmlOutput"> + </cfmodule> + </cfif> </cflock> |
From: <nan...@us...> - 2003-06-05 03:54:00
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv6358/Query Added Files: alterTable.cfm Log Message: Functionality Added: [ 749306 ] Added File Query/alterTable.cfm (Custom Tag) Added vars: rawSQL, htmlSQL Started generating ALTER TABLE Command Strings: - ALTER TABLE - Table Name Added "Output SQL" logic Added "Execute ALTER TABLE Command" if statment (Body still needs developing) --- NEW FILE: alterTable.cfm --- <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * * Template: Query/alterTable.cfm (Custom Tag) * * Purpose: - Executes and/or displays an ALTER TABLE command * * - In Start Mode, the alter table strings are generated and sent back to * * caller if requested * * - In End Mode, the Query is executed * * Inputs Required: - table String * * - execute Boolean * * - alterSpec Array of Structures * * Inputs Optional: - dataSource String * * - userName String * * - password String * * - sqlOutputType (RAW|HTML|BOTH) * * Outputs: - rawOutput String * * - htmlOutput String * * Other Requirements- This Custom Tag requires an end tag * ********************************************************************************************---> <!---||| Determine which execution mode this custom tag is in |||---> <cfswitch expression="#ThisTag.ExecutionMode#"> <!---||| If in start mode ... |||---> <cfcase value="start"> <!----------------------> <!--- Error Checking ---> <!----------------------> <!---||| Check for existence of Required Attributes |||---> <!--- This needs to be developed ---> <!---||| Check for proper data types, to ensure SQL syntax is correct |||---> <!--- This needs to be developed ---> <!--------------------------------------------> <!--- Generate ALTER TABLE Command Strings ---> <!--------------------------------------------> <!--- Initialize Internal Variables ---> <cfset rawSQL = "ALTER TABLE"> <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> <!--- Table Name ---> <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> <!--- alter_spec ---> <!--- ADD COLUMN ---> <!--- ADD INDEX ---> <!--- ADD PRIMARY KEY ---> <!--- ADD UNIQUE ---> <!--- ADD FULLTEXT ---> <!--- ADD FOREIGN KEY ---> <!--- ALTER COLUMN ---> <!--- CHANGE COLUMN ---> <!--- MODIFY COLUMN ---> <!--- DROP COLUMN ---> <!--- DROP PRIMARY KEY ---> <!--- DROP INDEX ---> <!--- DISABLE KEYS ---> <!--- ENABLE KEYS ---> <!--- RENAME TO ---> <!--- ORDER BY ---> <!--- table_options ---> </cfcase> <!---||| If in end mode ... |||---> <cfcase value="end"> <!------------------> <!--- Output SQL ---> <!------------------> <!---||| If Output was requested... |||---> <cfif IsDefined("ATTRIBUTES.sqlOutputType")> <!---||| Return RAW SQL if Requested |||---> <cfif ATTRIBUTES.sqlOutputType IS "RAW" OR ATTRIBUTES.sqlOutputType IS "BOTH"> <cfset "CALLER.#ATTRIBUTES.rawOutput#" = rawSQL> </cfif> <!---||| Return HTML display friendly SQL if Requested |||---> <cfif ATTRIBUTES.sqlOutputType IS "HTML" OR ATTRIBUTES.sqlOutputType IS "BOTH"> <cfset "CALLER.#ATTRIBUTES.htmlOutput#" = htmlSQL> </cfif> </cfif> <!-----------------------------------> <!--- Execute ALTER TABLE Command ---> <!-----------------------------------> <!--- If Execution was requested ... ---> <cfif ATTRIBUTES.execute> <!---<cfquery name="#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> <!--- Execute Generated rawSQL ---> #rawSQL# </cfquery>---> </cfif> </cfcase> </cfswitch> |
From: <nan...@us...> - 2003-06-05 03:34:55
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Styles In directory sc8-pr-cvs1:/tmp/cvs-serv29606/Styles Modified Files: master.css Log Message: Cosmetic Change: [ 749302 ] Added new CSS Classes: - Added Class span.KeyWord - Added Class span.String Index: master.css =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Styles/master.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** master.css 26 May 2003 02:44:36 -0000 1.2 --- master.css 5 Jun 2003 03:34:52 -0000 1.3 *************** *** 1,106 **** ! /*Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license*/ ! ! /*=== IDs ===*/ ! /* None for now */ ! ! /*=== Default Formating ===*/ ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{font-size:14px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{color: #000000;} ! body{background:#CCCCFF; margin:0px; padding:0px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,address,noscript{font-family: "Times New Roman", Times, serif;} ! code,pre,tt {font-family: courier,sans-serif} ! blockquote,q{font-family: Arial, Helvetica, sans-serif;} ! ! /*=== Paragraph Formating ===*/ ! p{text-align:justify; text-indent:30px;} ! p:first-letter{font-size:16px; font-style:oblique; font-weight:bold;} ! p.Plain, p:first-letter.Plain{text-indent: 0px; font: normal normal 14px;} ! ! /*=== Headings ===*/ ! h1, h2, h3, h4, h5, h6{ ! font-family: serif, Geneva, sans-serif, Arial, Helvetica; ! color: #330066; ! background-color : #9999CC; ! font-weight : bold; ! font-style : italic; ! padding : 3px; ! margin-bottom : 3px; ! margin-top : 3px; ! } ! h1{font-size : 26px;border : ridge;text-align: center;} ! h2{text-indent : 5px;font-size : 23px;} ! h3{text-indent : 30px;font-size : 20px;} ! h4{text-indent :55px;font-size : 18px;} ! h5{text-indent : 80px;font-size : 16px;} ! H6{text-indent : 105px;font-size : 14px;} ! ! /*=== Links ===*/ ! a{font-weight: inherit; font-size : inherit; font-family : inherit;} ! a:Link{color : #0066CC;} ! a:Visited{color : #9900CC;} ! a:Link, a:Visited{text-decoration: none;background-color : #FFFFCC;} ! a:Hover, a:Visited:Hover{color: #990000;text-decoration: underline;background-color : #FFFF99;} ! a:Active{color:#FF0000;text-decoration: underline;background-color : #FFFF99;} ! ! /*=== Forms ===*/ ! form,label,input,select,optgroup,option,textarea,fieldset,legend,button{ ! font-size : 11pt; ! font-family : Arial, Helvetica, sans-serif; ! } ! ! /*=== General Classes ===*/ ! .ToDo{ ! background : #FF9900; ! color : #990066; ! font-size : 11pt; ! } ! .Warning{ ! background : #FF9900; ! color : #990066; ! font-size : 16pt; ! } ! ! .Bold{font-weight:bold;} ! .BoldCenter{font-weight:bold;text-align:center;} ! .Center{text-align:center} ! .Right{text-align:right;} ! ! /*=== Tag Specific Classes ===*/ ! tr.Head{background:#9999CC;} ! tr.Odd{background:#999966;} ! tr.Even{background:#CCCC99;} ! ! div.Code, pre.Code{ ! text-align : left; ! background-color : #CCCCCC; ! margin : 5px 20px 5px 20px; ! font-family : "Courier New", Courier, monospace; ! padding : 5px 20px 5px 20px; ! font-size : 11pt; ! } ! ! span.Code{ ! background-color : #CCCCCC; ! font-family : "Courier New", Courier, monospace; ! font-size : 11pt; ! padding : 0px 2px 0px 2px; ! } ! ! /* Fancy Form */ ! form.Fancy,fieldset.Fancy{ ! color : #000000; ! padding : 3px 3px 3px; ! border : 3px ridge; ! } ! form.Fancy{ ! background-color : #CCCC99; ! margin: 15px 15px 15px 15px; ! } ! fieldset.Fancy{margin: 5px 5px 5px 5px;} ! legend.Fancy{color: #660099;font : small-caps;letter-spacing: 4px;} ! label.Fancy,input.Fancy,select.Fancy,textarea.Fancy,button.Fancy,legend.Fancy{margin: 2px 2px 2px 2px;} ! label.Fancy{color: #663300;} ! input.Fancy,select.Fancy,optgroup.Fancy,option.Fancy,textarea.Fancy,button.Fancy{ ! background-color : #FFFFCC; ! color: #666666; } --- 1,117 ---- ! /*Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license*/ ! ! /*=== IDs ===*/ ! /* None for now */ ! ! /*=== Default Formating ===*/ ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{font-size:14px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{color: #000000;} ! body{background:#CCCCFF; margin:0px; padding:0px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,address,noscript{font-family: "Times New Roman", Times, serif;} ! code,pre,tt {font-family: courier,sans-serif} ! blockquote,q{font-family: Arial, Helvetica, sans-serif;} ! ! /*=== Paragraph Formating ===*/ ! p{text-align:justify; text-indent:30px;} ! p:first-letter{font-size:16px; font-style:oblique; font-weight:bold;} ! p.Plain, p:first-letter.Plain{text-indent: 0px; font: normal normal 14px;} ! ! /*=== Headings ===*/ ! h1, h2, h3, h4, h5, h6{ ! font-family: serif, Geneva, sans-serif, Arial, Helvetica; ! color: #330066; ! background-color : #9999CC; ! font-weight : bold; ! font-style : italic; ! padding : 3px; ! margin-bottom : 3px; ! margin-top : 3px; ! } ! h1{font-size : 26px;border : ridge;text-align: center;} ! h2{text-indent : 5px;font-size : 23px;} ! h3{text-indent : 30px;font-size : 20px;} ! h4{text-indent :55px;font-size : 18px;} ! h5{text-indent : 80px;font-size : 16px;} ! H6{text-indent : 105px;font-size : 14px;} ! ! /*=== Links ===*/ ! a{font-weight: inherit; font-size : inherit; font-family : inherit;} ! a:Link{color : #0066CC;} ! a:Visited{color : #9900CC;} ! a:Link, a:Visited{text-decoration: none;background-color : #FFFFCC;} ! a:Hover, a:Visited:Hover{color: #990000;text-decoration: underline;background-color : #FFFF99;} ! a:Active{color:#FF0000;text-decoration: underline;background-color : #FFFF99;} ! ! /*=== Forms ===*/ ! form,label,input,select,optgroup,option,textarea,fieldset,legend,button{ ! font-size : 11pt; ! font-family : Arial, Helvetica, sans-serif; ! } ! ! /*=== General Classes ===*/ ! .ToDo{ ! background : #FF9900; ! color : #990066; ! font-size : 11pt; ! } ! .Warning{ ! background : #FF9900; ! color : #990066; ! font-size : 16pt; ! } ! ! .Bold{font-weight:bold;} ! .BoldCenter{font-weight:bold;text-align:center;} ! .Center{text-align:center} ! .Right{text-align:right;} ! ! /*=== Tag Specific Classes ===*/ ! tr.Head{background:#9999CC;} ! tr.Odd{background:#999966;} ! tr.Even{background:#CCCC99;} ! ! /* Code Blocks */ ! div.Code, pre.Code{ ! text-align : left; ! background-color : #FFFF99; ! color: #666666; ! margin : 5px 20px 5px 20px; ! font-family : "Courier New", Courier, monospace; ! padding : 5px 20px 5px 20px; ! font-size : 11pt; ! border: 1px dotted #FF0000; ! } ! ! span.Code,span.KeyWord,span.String{ ! background-color : #FFFF99; ! color: #666666; ! font-family : "Courier New", Courier, monospace; ! font-size : 11pt; ! } ! span.KeyWord{ ! font-weight: bold; ! color: #3366CC; ! } ! span.String{ ! font-weight: bold; ! color: #009900; ! } ! ! /* Fancy Form */ ! form.Fancy,fieldset.Fancy{ ! color : #000000; ! padding : 3px 3px 3px; ! border : 3px ridge; ! } ! form.Fancy{ ! background-color : #CCCC99; ! margin: 15px 15px 15px 15px; ! } ! fieldset.Fancy{margin: 5px 5px 5px 5px;} ! legend.Fancy{color: #660099;font : small-caps;letter-spacing: 4px;} ! label.Fancy,input.Fancy,select.Fancy,textarea.Fancy,button.Fancy,legend.Fancy{margin: 2px 2px 2px 2px;} ! label.Fancy{color: #663300;} ! input.Fancy,select.Fancy,optgroup.Fancy,option.Fancy,textarea.Fancy,button.Fancy{ ! background-color : #FFFFCC; ! color: #666666; } |
From: <nan...@us...> - 2003-06-01 03:35:38
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv12465/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 746862 ] Continued Development of dbProcessBody/AddField.cfm Completed INTEGER, FLOAT, DOUBLE, DECIMAL, DATE, TIME, TIMESTAMP Options Moved Field Name and Type in same column for more condensed look Some development on the INDEX column. (More work required) Added Quick Reference Notes Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AddField.cfm 29 May 2003 23:41:51 -0000 1.4 --- AddField.cfm 1 Jun 2003 03:35:35 -0000 1.5 *************** *** 10,17 **** <cfparam name="FORM.numberOfFields" default="1" /> <cfparam name="FORM.locationOfFields" default="End" /> - <cfdump var="number of fields: #FORM.numberOfFields# location of fields: #FORM.locationOfFields#"> ! <!---||| Initiate a Read Only lock to ensure the integrity of session variables |||---> ! <cflock timeout = "30" throwontimeout="no" type = "readonly" scope = "session"> <!---||| Create AddField FORM |||---> <cfform action="#currentPath#?#SESSION.URLToken#&dbProcess=AddField&table=#URL.table#" method="post" name="FORM_AddField" enablecab="yes" class="Fancy"> --- 10,15 ---- <cfparam name="FORM.numberOfFields" default="1" /> <cfparam name="FORM.locationOfFields" default="End" /> ! <!---||| Initiate a Read Only lock to ensure the integrity of session variables |||---><cflock timeout = "30" throwontimeout="no" type = "readonly" scope = "session"> <!---||| Create AddField FORM |||---> <cfform action="#currentPath#?#SESSION.URLToken#&dbProcess=AddField&table=#URL.table#" method="post" name="FORM_AddField" enablecab="yes" class="Fancy"> *************** *** 60,65 **** <tr> <td><label class="Fancy">Field No:</label></td> ! <td><label class="Fancy">Field Name:</label></td> ! <td><label class="Fancy">Field Type:</label></td> <td><label class="Fancy">Field Options:</label></td> <td><label class="Fancy">Default Value:</label></td> --- 58,62 ---- <tr> <td><label class="Fancy">Field No:</label></td> ! <td><label class="Fancy">Field Name and Type:</label></td> <td><label class="Fancy">Field Options:</label></td> <td><label class="Fancy">Default Value:</label></td> *************** *** 78,89 **** <!--- Set a default value of empty string ---> <cfparam name="FORM.fieldName#i#" default="" /> - <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> - <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> - <td><cfinput name="fieldName#i#" type="text" value="#Evaluate("FORM.fieldName#i#")#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /></td> - - <!---||| Allow User to Select Field Type |||---> - <!--- Set a default value of empty string ---> <cfparam name="FORM.fieldType#i#" default="" /> <td> <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> <!--- Check to see if empty option was selected, and reselect it accordingly ---> --- 75,85 ---- <!--- Set a default value of empty string ---> <cfparam name="FORM.fieldName#i#" default="" /> <cfparam name="FORM.fieldType#i#" default="" /> + <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> <td> + <!--- Field Name ---> + <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> + <cfinput name="fieldName#i#" type="text" value="#Evaluate("FORM.fieldName#i#")#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /><br /> + <!--- Field Type ---> <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> <!--- Check to see if empty option was selected, and reselect it accordingly ---> *************** *** 277,282 **** <!--- Set default values of empty string for text fields ---> <cfparam name="FORM.length#i#" default="" /> - <cfparam name="FORM.displayWidth#i#" default="" /> <cfparam name="FORM.valueList#i#" default="" /> <td valign="middle"> <!---||| Show Available Field Options Based on Selected Field Type |||---> --- 273,278 ---- <!--- Set default values of empty string for text fields ---> <cfparam name="FORM.length#i#" default="" /> <cfparam name="FORM.valueList#i#" default="" /> + <cfparam name="FORM.numberOfDecimals#i#" default="" /> <td valign="middle"> <!---||| Show Available Field Options Based on Selected Field Type |||---> *************** *** 340,346 **** <!---||| INTEGER Options |||---> <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT"> ! <!--- Show "Display Width" Option, set value to previous request if it exists ---> <!--- Make sure it is an interger between 1-20, set it to not required ---> ! <nobr><label class="Fancy">Display Width(</label><cfinput name="displayWidth#i#" type="text" value="#Evaluate("FORM.displayWidth#i#")#" size="2" maxlength="2" range="1,20" required="no" message="The legal range for Display Width is 1-20. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> <!--- Show AUTO_INCREMENT Option, set it to checked if already set on a previous request ---> <nobr> --- 336,342 ---- <!---||| INTEGER Options |||---> <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT"> ! <!--- Show "Length" Option, set value to previous request if it exists ---> <!--- Make sure it is an interger between 1-20, set it to not required ---> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="2" maxlength="2" range="1,20" required="no" message="The legal range for length is 1-20 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> <!--- Show AUTO_INCREMENT Option, set it to checked if already set on a previous request ---> <nobr> *************** *** 381,421 **** </cfcase> ! <!---||| FLOAT and DOUBLE Options |||---> ! <cfcase value="FLOAT,DOUBLE"> ! FLOAT, DOUBLE: Needs to be developped<br /> ! Add:[(m,D)] fields<br /> ! <!--- Show UNSIGNED Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.unsigned#i#")> ! <cfinput name="unsigned#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="unsigned#i#" type="checkbox" /> ! </cfif> ! <label for="unsigned#i#" class="Fancy">UNSIGNED</label> ! </nobr><br /> ! <!--- Show ZEROFILL Option, set it to checked if already set on a previous request ---> <nobr> ! <cfif IsDefined("FORM.zerofill#i#")> ! <cfinput name="zerofill#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="zerofill#i#" type="checkbox" /> ! </cfif> ! <label for="zerofill#i#" class="Fancy">ZEROFILL</label> </nobr><br /> - <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> - <nobr> - <cfif IsDefined("FORM.notNull#i#")> - <cfinput name="notNull#i#" type="checkbox" checked="yes" /> - <cfelse> - <cfinput name="notNull#i#" type="checkbox" /> - </cfif> - <label for="notNull#i#" class="Fancy">NOT NULL</label> - </nobr> - </cfcase> - - <!---||| DECIMAL Options |||---> - <cfcase value="DECIMAL"> - DECIMAL: Needs to be developped<br /> - Add:[(m[,D])] fields<br /> <!--- Show UNSIGNED Option, set it to checked if already set on a previous request ---> <nobr> --- 377,392 ---- </cfcase> ! <!---||| FLOAT, DOUBLE and DECIMAL Options |||---> ! <cfcase value="FLOAT,DOUBLE,DECIMAL"> ! <!--- Show "Length" and "Decimals" Option, set value to previous request if it exists ---> ! <!--- Make sure it is an interger between 1-24, set it to not required ---> ! <nobr><label class="Fancy">Length, Decimals</label></nobr><br /> <nobr> ! <label class="Fancy">(</label> ! <cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="2" maxlength="2" range="1,24" required="no" message="The legal range for length is 1-24 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /> ! <label class="Fancy">,</label> ! <cfinput name="numberOfDecimals#i#" type="text" value="#Evaluate("FORM.numberOfDecimals#i#")#" size="2" maxlength="2" range="1,24" required="no" message="The legal range for Number of Decimals is 1-24. Please correct this field for row number #i#." validate="integer" class="Fancy" /> ! <label class="Fancy">)</label> </nobr><br /> <!--- Show UNSIGNED Option, set it to checked if already set on a previous request ---> <nobr> *************** *** 449,453 **** <!---||| DATE and TIME Options |||---> <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! DATE, TIME, DATETIME, YEAR, TIMESTAMP: Needs to be developped<br /> <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> <nobr> --- 420,445 ---- <!---||| DATE and TIME Options |||---> <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! <!--- Show "Length" Option if Data Type is TIMESTAMP, set value to previous request if it exists ---> ! <!--- Make sure it is an interger between 2-14, set it to not required ---> ! <cfif #Evaluate("FORM.fieldType#i#")# IS "TIMESTAMP"> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="2" maxlength="2" range="2,14" required="no" message="The legal range for Length is 2-14 in row number #i#. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> ! </cfif> ! ! <!--- Show "Length" Option if Data Type is TIMESTAMP ---> ! <!--- Set value 2 to checked if already set on a previous request otherwise set value 4 to checked ---> ! <cfif #Evaluate("FORM.fieldType#i#")# IS "YEAR"> ! <nobr> ! <label class="Fancy">Length(</label> ! <cfif #Evaluate("FORM.length#i#")# IS 2> ! <cfinput name="length#i#" type="radio" value="2" checked="yes" /><label class="Fancy">2</label> ! <cfinput name="length#i#" type="radio" value="4" /><label class="Fancy">4</label> ! <cfelse> ! <cfinput name="length#i#" type="radio" value="2" /><label class="Fancy">2</label> ! <cfinput name="length#i#" type="radio" value="4" checked="yes" /><label class="Fancy">4</label> ! </cfif> ! <label class="Fancy">)</label> ! </nobr> ! </cfif> ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> <nobr> *************** *** 480,488 **** <!---||| Allow User to Specify a Single Column Index |||---> <td> ! Primary ! Index ! Unique ! None ! Fulltext </td> </tr> --- 472,490 ---- <!---||| Allow User to Specify a Single Column Index |||---> <td> ! <cfinput name="key#i#" type="radio" value="Primary" /><label class="Fancy">Primary</label><br /> ! <cfinput name="key#i#" type="radio" value="Unique" /><label class="Fancy">Unique</label><br /> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> ! <cfcase value="TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,VARCHAR"> ! <cfinput name="key#i#" type="radio" value="Fulltext" /><label class="Fancy">Fulltext</label><br /> ! </cfcase> ! </cfswitch> ! <cfinput name="key#i#" type="radio" value="Index" /><label class="Fancy">Index</label> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,CHAR,VARCHAR"> ! Length() ! </cfcase> ! </cfswitch> ! <br /> ! <cfinput name="key#i#" type="radio" value="None" checked="yes" /><label class="Fancy">None</label> </td> </tr> *************** *** 506,508 **** </fieldset> </cfform> ! </cflock> \ No newline at end of file --- 508,519 ---- </fieldset> </cfform> ! </cflock> ! ! ! <h3>Quick Reference Notes</h3> ! <ul> ! <li>Note that if you specify ZEROFILL for a column, MySQL will automatically add the UNSIGNED attribute to the column.</li> ! <li>BLOB and TEXT field types can not have default values.</li> ! <li>A DEFAULT value has to be a constant, it cannot be a function or an expression.</li> ! <li>When putting an index on a BLOB or TEXT column, you MUST always specify the length of the index.</li> ! </ul> \ No newline at end of file |
From: <nan...@us...> - 2003-05-29 23:43:56
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv13725/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 745828 ] Continued Development of dbProcessBody/AddField.cfm Added Statemanagement of check boxes to remember the last onChange state of each check box. Completed ENUM and SET Options Added Place Holder for SQL Preview Fixed a number of minor bugs, enhenced overall look and feel Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AddField.cfm 29 May 2003 03:42:06 -0000 1.3 --- AddField.cfm 29 May 2003 23:41:51 -0000 1.4 *************** *** 1,352 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessBody/AddField.cfm * ! * Purpose: Displays the Body Content for the AddField Database Process * ! * Requiremets: -fieldList Query must be run on same page prior to including this template * ! * -URL.table (table name) must have been passed from calling template * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! <cfdump var="number of fields: #FORM.numberOfFields# location of fields: #FORM.locationOfFields#"> ! ! <!---||| Initiate a Read Only lock to ensure the integrity of session variables |||---> ! <cflock timeout = "30" throwontimeout="no" type = "readonly" scope = "session"> ! <!---||| Create AddField FORM |||---> ! <cfform action="#currentPath#?#SESSION.URLToken#&dbProcess=AddField&table=#URL.table#" method="post" name="FORM_AddField" enablecab="yes" class="Fancy"> ! <!---||| General Settings (number of new fields, location of new fields) |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Add New Field(s) to Table <cfoutput>#URL.table#</cfoutput></legend> ! ! <!---||| Allow User to Specify the Number of New Fields |||---> ! <!---||| Set the default value to the last requested value |||---> ! <label for="numberOfFields" class="Fancy">Number of New Fields:</label> ! <cfinput name="numberOfFields" type="text" value="#FORM.numberOfFields#" size="2" maxlength="2" range="1,99" required="yes" message="You must enter an interger between 1 and 99 for the number of records field." validate="integer" class="Fancy" onChange="this.form.submit()" /> ! <br /> ! ! <!---||| Allow User to Specify the Location for the New Fields |||---> ! <!---||| Set the selected option to the last requested value |||---> ! <label for="locationOfFields" class="Fancy">Location of New Fields:</label> ! <cfselect name="locationOfFields" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> ! <!---||| Create options for adding the new field(s) at the beginning and at the end of the current table |||---> ! <cfif FORM.locationOfFields IS "End"> ! <option value="End" selected class="Fancy">At End of Table <cfoutput>#URL.table#</cfoutput></option> ! <cfelse> ! <option value="End" class="Fancy">At End of Table <cfoutput>#URL.table#</cfoutput></option> ! </cfif> ! <cfif FORM.locationOfFields IS "Beginning"> ! <option value="Beginning" selected class="Fancy">At Beginning of Table <cfoutput>#URL.table#</cfoutput></option> ! <cfelse> ! <option value="Beginning" class="Fancy">At Beginning of Table <cfoutput>#URL.table#</cfoutput></option> ! </cfif> ! ! <!---||| Create options for adding the new field(s) after each of the current fields |||---> ! <cfoutput query="fieldList"> ! <cfif FORM.locationOfFields IS fieldList.FIELD> ! <option value="#fieldList.FIELD#" selected class="Fancy">After #fieldList.FIELD#</option> ! <cfelse> ! <option value="#fieldList.FIELD#" class="Fancy">After #fieldList.FIELD#</option> ! </cfif> ! </cfoutput> ! </cfselect> ! </fieldset> ! ! <!---||| Field Definitions |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Field Definitions</legend> ! <table width="100%" border="1" cellpadding="2" cellspacing="0"> ! <!---||| Create Header |||---> ! <tr> ! <td><label class="Fancy">Field No:</label></td> ! <td><label class="Fancy">Field Name:</label></td> ! <td><label class="Fancy">Field Type:</label></td> ! <td><label class="Fancy">Field Options:</label></td> ! <td><label class="Fancy">Default Value:</label></td> ! <td><label class="Fancy">Index:</label></td> ! </tr> ! ! <!---||| Set up a new table row for each field user needs to define |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <cfoutput> ! <!--- Alternate the Row Colours from class style Odd to class style Even ---> ! <tr class="#IIF(i MOD 2, DE('Odd'), DE('Even'))#"> ! <!--- Print Row Number ---> ! <td><label class="Fancy">#i#</label></td> ! ! <!---||| Allow User to Specify the Fields Name |||---> ! <!--- Set a default value of empty string ---> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> ! <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> ! <td><cfinput name="fieldName#i#" type="text" value="#Evaluate("FORM.fieldName#i#")#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /></td> ! ! <!---||| Allow User to Select Field Type |||---> ! <!--- Set a default value of empty string ---> ! <cfparam name="FORM.fieldType#i#" default="" /> ! <td> ! <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> ! <!--- Check to see if empty option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS ""> ! <option value="Empty" selected class="Fancy"></option> ! <cfelse> ! <option value="Empty" class="Fancy"></option> ! </cfif> ! <optgroup label="String" class="Fancy"> ! <!--- Check to see if VARCHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "VARCHAR"> ! <option value="VARCHAR" selected class="Fancy">VARCHAR(m)</option> ! <cfelse> ! <option value="VARCHAR" class="Fancy">VARCHAR(m)</option> ! </cfif> ! ! <!--- Check to see if CHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "CHAR"> ! <option value="CHAR" selected class="Fancy">CHAR(m)</option> ! <cfelse> ! <option value="CHAR" class="Fancy">CHAR(m)</option> ! </cfif> ! ! <!--- Check to see if TINYBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYBLOB"> ! <option value="TINYBLOB" selected class="Fancy">TINYBLOB</option> ! <cfelse> ! <option value="TINYBLOB" class="Fancy">TINYBLOB</option> ! </cfif> ! ! <!--- Check to see if BLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BLOB"> ! <option value="BLOB" selected class="Fancy">BLOB</option> ! <cfelse> ! <option value="BLOB" class="Fancy">BLOB</option> ! </cfif> ! ! <!--- Check to see if MEDIUMBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMBLOB"> ! <option value="MEDIUMBLOB" selected class="Fancy">MEDIUMBLOB</option> ! <cfelse> ! <option value="MEDIUMBLOB" class="Fancy">MEDIUMBLOB</option> ! </cfif> ! ! <!--- Check to see if LONGBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGBLOB"> ! <option value="LONGBLOB" selected class="Fancy">LONGBLOB</option> ! <cfelse> ! <option value="LONGBLOB" class="Fancy">LONGBLOB</option> ! </cfif> ! ! <!--- Check to see if TINYTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYTEXT"> ! <option value="TINYTEXT" selected class="Fancy">TINYTEXT</option> ! <cfelse> ! <option value="TINYTEXT" class="Fancy">TINYTEXT</option> ! </cfif> ! ! <!--- Check to see if TEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TEXT"> ! <option value="TEXT" selected class="Fancy">TEXT</option> ! <cfelse> ! <option value="TEXT" class="Fancy">TEXT</option> ! </cfif> ! ! <!--- Check to see if MEDIUMTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMTEXT"> ! <option value="MEDIUMTEXT" selected class="Fancy">MEDIUMTEXT</option> ! <cfelse> ! <option value="MEDIUMTEXT" class="Fancy">MEDIUMTEXT</option> ! </cfif> ! ! <!--- Check to see if LONGTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGTEXT"> ! <option value="LONGTEXT" selected class="Fancy">LONGTEXT</option> ! <cfelse> ! <option value="LONGTEXT" class="Fancy">LONGTEXT</option> ! </cfif> ! ! <!--- Check to see if ENUM option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "ENUM"> ! <option value="ENUM" selected class="Fancy">ENUM(v1,v2,...)</option> ! <cfelse> ! <option value="ENUM" class="Fancy">ENUM(v1,v2,...)</option> ! </cfif> ! ! <!--- Check to see if SET option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SET"> ! <option value="SET" selected class="Fancy">SET(v1,v2,...)</option> ! <cfelse> ! <option value="SET" class="Fancy">SET(v1,v2,...)</option> ! </cfif> ! </optgroup> ! <optgroup label="Numeric" class="Fancy"> ! <!--- Check to see if TINYINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYINT"> ! <option value="TINYINT" selected class="Fancy">TINYINT(m)</option> ! <cfelse> ! <option value="TINYINT" class="Fancy">TINYINT(m)</option> ! </cfif> ! ! <!--- Check to see if SMALLINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SMALLINT"> ! <option value="SMALLINT" selected class="Fancy">SMALLINT(m)</option> ! <cfelse> ! <option value="SMALLINT" class="Fancy">SMALLINT(m)</option> ! </cfif> ! ! <!--- Check to see if MEDIUMINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMINT"> ! <option value="MEDIUMINT" selected class="Fancy">MEDIUMINT(m)</option> ! <cfelse> ! <option value="MEDIUMINT" class="Fancy">MEDIUMINT(m)</option> ! </cfif> ! ! <!--- Check to see if INT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "INT"> ! <option value="INT" selected class="Fancy">INT(m)</option> ! <cfelse> ! <option value="INT" class="Fancy">INT(m)</option> ! </cfif> ! ! <!--- Check to see if BIGINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BIGINT"> ! <option value="BIGINT" selected class="Fancy">BIGINT(m)</option> ! <cfelse> ! <option value="BIGINT" class="Fancy">BIGINT(m)</option> ! </cfif> ! ! <!--- Check to see if FLOAT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "FLOAT"> ! <option value="FLOAT" selected class="Fancy">FLOAT(m,d)</option> ! <cfelse> ! <option value="FLOAT" class="Fancy">FLOAT(m,d)</option> ! </cfif> ! ! <!--- Check to see if DOUBLE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DOUBLE"> ! <option value="DOUBLE" selected class="Fancy">DOUBLE(m,d)</option> ! <cfelse> ! <option value="DOUBLE" class="Fancy">DOUBLE(m,d)</option> ! </cfif> ! ! <!--- Check to see if DECIMAL option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DECIMAL"> ! <option value="DECIMAL" selected class="Fancy">DECIMAL(m,d)</option> ! <cfelse> ! <option value="DECIMAL" class="Fancy">DECIMAL(m,d)</option> ! </cfif> ! </optgroup> ! <optgroup label="Date Time" class="Fancy"> ! <!--- Check to see if DATE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATE"> ! <option value="DATE" selected class="Fancy">DATE</option> ! <cfelse> ! <option value="DATE" class="Fancy">DATE</option> ! </cfif> ! ! <!--- Check to see if TIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIME"> ! <option value="TIME" selected class="Fancy">TIME</option> ! <cfelse> ! <option value="TIME" class="Fancy">TIME</option> ! </cfif> ! ! <!--- Check to see if DATETIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATETIME"> ! <option value="DATETIME" selected class="Fancy">DATETIME</option> ! <cfelse> ! <option value="DATETIME" class="Fancy">DATETIME</option> ! </cfif> ! ! <!--- Check to see if YEAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "YEAR"> ! <option value="YEAR" selected class="Fancy">YEAR</option> ! <cfelse> ! <option value="YEAR" class="Fancy">YEAR</option> ! </cfif> ! ! <!--- Check to see if TIMESTAMP option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIMESTAMP"> ! <option value="TIMESTAMP" selected class="Fancy">TIMESTAMP(m)</option> ! <cfelse> ! <option value="TIMESTAMP" class="Fancy">TIMESTAMP(m)</option> ! </cfif> ! </optgroup> ! </cfselect> ! </td> ! ! <!---||| Allow User to Enter Field Options |||---> ! <!--- Set a default values of empty string ---> ! <cfparam name="FORM.length#i#" default="" /> ! <cfparam name="FORM.displayWidth#i#" default="" /> ! <cfparam name="FORM.autoIncrement#i#" default="" /> ! <cfparam name="FORM.unsigned#i#" default="" /> ! <cfparam name="FORM.zerofill#i#" default="" /> ! <cfparam name="FORM.notNull#i#" default="" /> ! <cfparam name="FORM.binary#i#" default="" /> ! <td valign="middle"> ! <!---||| Show Available Field Options Based on Selected Field Type |||---> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> ! <cfcase value="VARCHAR,CHAR"> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="3" maxlength="3" range="0,255" required="yes" message="The legal range for length is 0-255. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> ! <nobr><cfinput name="binary#i#" type="checkbox" /><label for="binary#i#" class="Fancy">BINARY</label></nobr><br /> ! <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> ! </cfcase> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> ! </cfcase> ! <cfcase value="ENUM,SET"> ! Enum,Set: Needs to be developped<br /> ! <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> ! </cfcase> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT"> ! <nobr><label class="Fancy">Display Width(</label><cfinput name="displayWidth#i#" type="text" value="#Evaluate("FORM.displayWidth#i#")#" size="2" maxlength="2" range="1,20" message="The legal range for Display Width is 1-20. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> ! <nobr><cfinput name="autoIncrement#i#" type="checkbox" /><label for="autoIncrement#i#" class="Fancy">AUTO_INCREMENT</label></nobr><br /> ! <nobr><cfinput name="unsigned#i#" type="checkbox" /><label for="unsigned#i#" class="Fancy">UNSIGNED</label></nobr><br /> ! <nobr><cfinput name="zerofill#i#" type="checkbox" /><label for="zerofill#i#" class="Fancy">ZEROFILL</label></nobr><br /> ! <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> ! </cfcase> ! <cfcase value="FLOAT,DOUBLE,DECIMAL"> ! FLOAT,DOUBLE,DECIMAL: Needs to be developped<br /> ! <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> ! </cfcase> ! <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! DATE,TIME,DATETIME,YEAR,TIMESTAMP: Needs to be developped<br /> ! <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> ! </cfcase> ! <cfdefaultcase><label class="Fancy">Select a Field Type to see Field Options</label></cfdefaultcase> ! </cfswitch> ! </td> ! ! <!---||| Allow User to Enter a Default Value for the Field Unless fieldType is BLOB or TEXT |||---> ! <td> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <label class="Fancy">BLOB and TEXT field types can not have default values.</label> ! </cfcase> ! <cfdefaultcase><cfinput name="default#i#" value="#Evaluate("FORM.default#i#")#" type="text" size="20" required="no" class="Fancy" /></cfdefaultcase> ! </cfswitch> ! ! ! </td> ! ! <!---||| Allow User to Specify a Single Column Index |||---> ! <td> ! Primary ! Index ! Unique ! None ! Fulltext ! </td> ! </tr> ! </cfoutput> ! </cfloop> ! </table> ! </fieldset> ! ! <!---||| Submit Request |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Run Alter Table Query</legend> ! <!---***Insert a query box of the SQL that is about to be executed***---> ! <input name="AddFields" type="submit" value="Add Fields as Defined Above"> ! </fieldset> ! </cfform> </cflock> --- 1,508 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: dbProcessBody/AddField.cfm * ! * Purpose: Displays the Body Content for the AddField Database Process * ! * Requiremets: -fieldList Query must be run on same page prior to including this template * ! * -URL.table (table name) must have been passed from calling template * ! ********************************************************************************************---> ! ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! <cfdump var="number of fields: #FORM.numberOfFields# location of fields: #FORM.locationOfFields#"> ! ! <!---||| Initiate a Read Only lock to ensure the integrity of session variables |||---> ! <cflock timeout = "30" throwontimeout="no" type = "readonly" scope = "session"> ! <!---||| Create AddField FORM |||---> ! <cfform action="#currentPath#?#SESSION.URLToken#&dbProcess=AddField&table=#URL.table#" method="post" name="FORM_AddField" enablecab="yes" class="Fancy"> ! <!---||| General Settings (number of new fields, location of new fields) |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Add New Field(s) to Table <cfoutput>#URL.table#</cfoutput></legend> ! ! <!---||| Allow User to Specify the Number of New Fields |||---> ! <!---||| Set the default value to the last requested value |||---> ! <label for="numberOfFields" class="Fancy">Number of New Fields:</label> ! <cfinput name="numberOfFields" type="text" value="#FORM.numberOfFields#" size="2" maxlength="2" range="1,99" required="yes" message="You must enter an interger between 1 and 99 for the number of records field." validate="integer" class="Fancy" onChange="this.form.submit()" /> ! <br /> ! ! <!---||| Allow User to Specify the Location for the New Fields |||---> ! <!---||| Set the selected option to the last requested value |||---> ! <label for="locationOfFields" class="Fancy">Location of New Fields:</label> ! <cfselect name="locationOfFields" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> ! <!---||| Create options for adding the new field(s) at the beginning and at the end of the current table |||---> ! <cfif FORM.locationOfFields IS "End"> ! <option value="End" selected class="Fancy">At End of Table <cfoutput>#URL.table#</cfoutput></option> ! <cfelse> ! <option value="End" class="Fancy">At End of Table <cfoutput>#URL.table#</cfoutput></option> ! </cfif> ! <cfif FORM.locationOfFields IS "Beginning"> ! <option value="Beginning" selected class="Fancy">At Beginning of Table <cfoutput>#URL.table#</cfoutput></option> ! <cfelse> ! <option value="Beginning" class="Fancy">At Beginning of Table <cfoutput>#URL.table#</cfoutput></option> ! </cfif> ! ! <!---||| Create options for adding the new field(s) after each of the current fields |||---> ! <cfoutput query="fieldList"> ! <cfif FORM.locationOfFields IS fieldList.FIELD> ! <option value="#fieldList.FIELD#" selected class="Fancy">After #fieldList.FIELD#</option> ! <cfelse> ! <option value="#fieldList.FIELD#" class="Fancy">After #fieldList.FIELD#</option> ! </cfif> ! </cfoutput> ! </cfselect> ! </fieldset> ! ! <!---||| Field Definitions |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Field Definitions</legend> ! <table width="100%" border="1" cellpadding="2" cellspacing="0"> ! <!---||| Create Header |||---> ! <tr> ! <td><label class="Fancy">Field No:</label></td> ! <td><label class="Fancy">Field Name:</label></td> ! <td><label class="Fancy">Field Type:</label></td> ! <td><label class="Fancy">Field Options:</label></td> ! <td><label class="Fancy">Default Value:</label></td> ! <td><label class="Fancy">Index:</label></td> ! </tr> ! ! <!---||| Set up a new table row for each field user needs to define |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <cfoutput> ! <!--- Alternate the Row Colours from class style Odd to class style Even ---> ! <tr class="#IIF(i MOD 2, DE('Odd'), DE('Even'))#"> ! <!--- Print Row Number ---> ! <td><label class="Fancy">#i#</label></td> ! ! <!---||| Allow User to Specify the Fields Name |||---> ! <!--- Set a default value of empty string ---> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> ! <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> ! <td><cfinput name="fieldName#i#" type="text" value="#Evaluate("FORM.fieldName#i#")#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /></td> ! ! <!---||| Allow User to Select Field Type |||---> ! <!--- Set a default value of empty string ---> ! <cfparam name="FORM.fieldType#i#" default="" /> ! <td> ! <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> ! <!--- Check to see if empty option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS ""> ! <option value="Empty" selected class="Fancy"></option> ! <cfelse> ! <option value="Empty" class="Fancy"></option> ! </cfif> ! <optgroup label="String" class="Fancy"> ! <!--- Check to see if VARCHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "VARCHAR"> ! <option value="VARCHAR" selected class="Fancy">VARCHAR(m)</option> ! <cfelse> ! <option value="VARCHAR" class="Fancy">VARCHAR(m)</option> ! </cfif> ! ! <!--- Check to see if CHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "CHAR"> ! <option value="CHAR" selected class="Fancy">CHAR(m)</option> ! <cfelse> ! <option value="CHAR" class="Fancy">CHAR(m)</option> ! </cfif> ! ! <!--- Check to see if TINYBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYBLOB"> ! <option value="TINYBLOB" selected class="Fancy">TINYBLOB</option> ! <cfelse> ! <option value="TINYBLOB" class="Fancy">TINYBLOB</option> ! </cfif> ! ! <!--- Check to see if BLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BLOB"> ! <option value="BLOB" selected class="Fancy">BLOB</option> ! <cfelse> ! <option value="BLOB" class="Fancy">BLOB</option> ! </cfif> ! ! <!--- Check to see if MEDIUMBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMBLOB"> ! <option value="MEDIUMBLOB" selected class="Fancy">MEDIUMBLOB</option> ! <cfelse> ! <option value="MEDIUMBLOB" class="Fancy">MEDIUMBLOB</option> ! </cfif> ! ! <!--- Check to see if LONGBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGBLOB"> ! <option value="LONGBLOB" selected class="Fancy">LONGBLOB</option> ! <cfelse> ! <option value="LONGBLOB" class="Fancy">LONGBLOB</option> ! </cfif> ! ! <!--- Check to see if TINYTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYTEXT"> ! <option value="TINYTEXT" selected class="Fancy">TINYTEXT</option> ! <cfelse> ! <option value="TINYTEXT" class="Fancy">TINYTEXT</option> ! </cfif> ! ! <!--- Check to see if TEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TEXT"> ! <option value="TEXT" selected class="Fancy">TEXT</option> ! <cfelse> ! <option value="TEXT" class="Fancy">TEXT</option> ! </cfif> ! ! <!--- Check to see if MEDIUMTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMTEXT"> ! <option value="MEDIUMTEXT" selected class="Fancy">MEDIUMTEXT</option> ! <cfelse> ! <option value="MEDIUMTEXT" class="Fancy">MEDIUMTEXT</option> ! </cfif> ! ! <!--- Check to see if LONGTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGTEXT"> ! <option value="LONGTEXT" selected class="Fancy">LONGTEXT</option> ! <cfelse> ! <option value="LONGTEXT" class="Fancy">LONGTEXT</option> ! </cfif> ! ! <!--- Check to see if ENUM option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "ENUM"> ! <option value="ENUM" selected class="Fancy">ENUM(v1,v2,...)</option> ! <cfelse> ! <option value="ENUM" class="Fancy">ENUM(v1,v2,...)</option> ! </cfif> ! ! <!--- Check to see if SET option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SET"> ! <option value="SET" selected class="Fancy">SET(v1,v2,...)</option> ! <cfelse> ! <option value="SET" class="Fancy">SET(v1,v2,...)</option> ! </cfif> ! </optgroup> ! <optgroup label="Numeric" class="Fancy"> ! <!--- Check to see if TINYINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYINT"> ! <option value="TINYINT" selected class="Fancy">TINYINT(m)</option> ! <cfelse> ! <option value="TINYINT" class="Fancy">TINYINT(m)</option> ! </cfif> ! ! <!--- Check to see if SMALLINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SMALLINT"> ! <option value="SMALLINT" selected class="Fancy">SMALLINT(m)</option> ! <cfelse> ! <option value="SMALLINT" class="Fancy">SMALLINT(m)</option> ! </cfif> ! ! <!--- Check to see if MEDIUMINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMINT"> ! <option value="MEDIUMINT" selected class="Fancy">MEDIUMINT(m)</option> ! <cfelse> ! <option value="MEDIUMINT" class="Fancy">MEDIUMINT(m)</option> ! </cfif> ! ! <!--- Check to see if INT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "INT"> ! <option value="INT" selected class="Fancy">INT(m)</option> ! <cfelse> ! <option value="INT" class="Fancy">INT(m)</option> ! </cfif> ! ! <!--- Check to see if BIGINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BIGINT"> ! <option value="BIGINT" selected class="Fancy">BIGINT(m)</option> ! <cfelse> ! <option value="BIGINT" class="Fancy">BIGINT(m)</option> ! </cfif> ! ! <!--- Check to see if FLOAT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "FLOAT"> ! <option value="FLOAT" selected class="Fancy">FLOAT(m,d)</option> ! <cfelse> ! <option value="FLOAT" class="Fancy">FLOAT(m,d)</option> ! </cfif> ! ! <!--- Check to see if DOUBLE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DOUBLE"> ! <option value="DOUBLE" selected class="Fancy">DOUBLE(m,d)</option> ! <cfelse> ! <option value="DOUBLE" class="Fancy">DOUBLE(m,d)</option> ! </cfif> ! ! <!--- Check to see if DECIMAL option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DECIMAL"> ! <option value="DECIMAL" selected class="Fancy">DECIMAL(m,d)</option> ! <cfelse> ! <option value="DECIMAL" class="Fancy">DECIMAL(m,d)</option> ! </cfif> ! </optgroup> ! <optgroup label="Date Time" class="Fancy"> ! <!--- Check to see if DATE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATE"> ! <option value="DATE" selected class="Fancy">DATE</option> ! <cfelse> ! <option value="DATE" class="Fancy">DATE</option> ! </cfif> ! ! <!--- Check to see if TIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIME"> ! <option value="TIME" selected class="Fancy">TIME</option> ! <cfelse> ! <option value="TIME" class="Fancy">TIME</option> ! </cfif> ! ! <!--- Check to see if DATETIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATETIME"> ! <option value="DATETIME" selected class="Fancy">DATETIME</option> ! <cfelse> ! <option value="DATETIME" class="Fancy">DATETIME</option> ! </cfif> ! ! <!--- Check to see if YEAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "YEAR"> ! <option value="YEAR" selected class="Fancy">YEAR</option> ! <cfelse> ! <option value="YEAR" class="Fancy">YEAR</option> ! </cfif> ! ! <!--- Check to see if TIMESTAMP option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIMESTAMP"> ! <option value="TIMESTAMP" selected class="Fancy">TIMESTAMP(m)</option> ! <cfelse> ! <option value="TIMESTAMP" class="Fancy">TIMESTAMP(m)</option> ! </cfif> ! </optgroup> ! </cfselect> ! </td> ! ! <!---||| Allow User to Enter Field Options |||---> ! <!--- Set default values of empty string for text fields ---> ! <cfparam name="FORM.length#i#" default="" /> ! <cfparam name="FORM.displayWidth#i#" default="" /> ! <cfparam name="FORM.valueList#i#" default="" /> ! <td valign="middle"> ! <!---||| Show Available Field Options Based on Selected Field Type |||---> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> ! <!---||| VARCHAR and CHAR Options |||---> ! <cfcase value="VARCHAR,CHAR"> ! <!--- Show Lenght Option, set value to previous request if it exists ---> ! <!--- Make sure it is an interger between 0-255, set it to required ---> ! <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="3" maxlength="3" range="0,255" required="yes" message="The legal range for length is 0-255. This is a required field. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> ! <!--- Show BINARY Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.binary#i#")> ! <cfinput name="binary#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="binary#i#" type="checkbox" /> ! </cfif> ! <label for="binary#i#" class="Fancy">BINARY</label> ! </nobr><br /> ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.notNull#i#")> ! <cfinput name="notNull#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="notNull#i#" type="checkbox" /> ! </cfif> ! <label for="notNull#i#" class="Fancy">NOT NULL</label> ! </nobr> ! </cfcase> ! ! <!---||| BLOB and TEXT Options |||---> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.notNull#i#")> ! <cfinput name="notNull#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="notNull#i#" type="checkbox" /> ! </cfif> ! <label for="notNull#i#" class="Fancy">NOT NULL</label> ! </nobr> ! </cfcase> ! ! <!---||| ENUM and SET Options |||---> ! <cfcase value="ENUM,SET"> ! <!--- Show "Value List" Option, set value to previous request if it exists ---> ! <label for="valueList#i#" class="Fancy">Value List:<br />Enter Each Value on a New Line</label><br /> ! <textarea name="valueList#i#" cols="20" rows="5" class="Fancy">#Evaluate("FORM.valueList#i#")#</textarea> ! <br /> ! ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.notNull#i#")> ! <cfinput name="notNull#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="notNull#i#" type="checkbox" /> ! </cfif> ! <label for="notNull#i#" class="Fancy">NOT NULL</label> ! </nobr> ! </cfcase> ! ! <!---||| INTEGER Options |||---> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT"> ! <!--- Show "Display Width" Option, set value to previous request if it exists ---> ! <!--- Make sure it is an interger between 1-20, set it to not required ---> ! <nobr><label class="Fancy">Display Width(</label><cfinput name="displayWidth#i#" type="text" value="#Evaluate("FORM.displayWidth#i#")#" size="2" maxlength="2" range="1,20" required="no" message="The legal range for Display Width is 1-20. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> ! <!--- Show AUTO_INCREMENT Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.autoIncrement#i#")> ! <cfinput name="autoIncrement#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="autoIncrement#i#" type="checkbox" /> ! </cfif> ! <label for="autoIncrement#i#" class="Fancy">AUTO_INCREMENT</label> ! </nobr><br /> ! <!--- Show UNSIGNED Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.unsigned#i#")> ! <cfinput name="unsigned#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="unsigned#i#" type="checkbox" /> ! </cfif> ! <label for="unsigned#i#" class="Fancy">UNSIGNED</label> ! </nobr><br /> ! <!--- Show ZEROFILL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.zerofill#i#")> ! <cfinput name="zerofill#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="zerofill#i#" type="checkbox" /> ! </cfif> ! <label for="zerofill#i#" class="Fancy">ZEROFILL</label> ! </nobr><br /> ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.notNull#i#")> ! <cfinput name="notNull#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="notNull#i#" type="checkbox" /> ! </cfif> ! <label for="notNull#i#" class="Fancy">NOT NULL</label> ! </nobr> ! </cfcase> ! ! <!---||| FLOAT and DOUBLE Options |||---> ! <cfcase value="FLOAT,DOUBLE"> ! FLOAT, DOUBLE: Needs to be developped<br /> ! Add:[(m,D)] fields<br /> ! <!--- Show UNSIGNED Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.unsigned#i#")> ! <cfinput name="unsigned#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="unsigned#i#" type="checkbox" /> ! </cfif> ! <label for="unsigned#i#" class="Fancy">UNSIGNED</label> ! </nobr><br /> ! <!--- Show ZEROFILL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.zerofill#i#")> ! <cfinput name="zerofill#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="zerofill#i#" type="checkbox" /> ! </cfif> ! <label for="zerofill#i#" class="Fancy">ZEROFILL</label> ! </nobr><br /> ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.notNull#i#")> ! <cfinput name="notNull#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="notNull#i#" type="checkbox" /> ! </cfif> ! <label for="notNull#i#" class="Fancy">NOT NULL</label> ! </nobr> ! </cfcase> ! ! <!---||| DECIMAL Options |||---> ! <cfcase value="DECIMAL"> ! DECIMAL: Needs to be developped<br /> ! Add:[(m[,D])] fields<br /> ! <!--- Show UNSIGNED Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.unsigned#i#")> ! <cfinput name="unsigned#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="unsigned#i#" type="checkbox" /> ! </cfif> ! <label for="unsigned#i#" class="Fancy">UNSIGNED</label> ! </nobr><br /> ! <!--- Show ZEROFILL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.zerofill#i#")> ! <cfinput name="zerofill#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="zerofill#i#" type="checkbox" /> ! </cfif> ! <label for="zerofill#i#" class="Fancy">ZEROFILL</label> ! </nobr><br /> ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.notNull#i#")> ! <cfinput name="notNull#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="notNull#i#" type="checkbox" /> ! </cfif> ! <label for="notNull#i#" class="Fancy">NOT NULL</label> ! </nobr> ! </cfcase> ! ! <!---||| DATE and TIME Options |||---> ! <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! DATE, TIME, DATETIME, YEAR, TIMESTAMP: Needs to be developped<br /> ! <!--- Show NOT NULL Option, set it to checked if already set on a previous request ---> ! <nobr> ! <cfif IsDefined("FORM.notNull#i#")> ! <cfinput name="notNull#i#" type="checkbox" checked="yes" /> ! <cfelse> ! <cfinput name="notNull#i#" type="checkbox" /> ! </cfif> ! <label for="notNull#i#" class="Fancy">NOT NULL</label> ! </nobr> ! </cfcase> ! ! <!---||| Datatype not selected default display |||---> ! <cfdefaultcase><label class="Fancy">Select a Field Type to see Field Options</label></cfdefaultcase> ! </cfswitch> ! </td> ! ! <!---||| Allow User to Enter a Default Value for the Field Unless fieldType is BLOB or TEXT |||---> ! <!--- Set default value of empty string ---> ! <cfparam name="FORM.default#i#" default="" /> ! <td> ! <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <label class="Fancy">BLOB and TEXT field types can not have default values.</label> ! </cfcase> ! <cfdefaultcase><cfinput name="default#i#" value="#Evaluate("FORM.default#i#")#" type="text" size="20" required="no" class="Fancy" /></cfdefaultcase> ! </cfswitch> ! </td> ! ! <!---||| Allow User to Specify a Single Column Index |||---> ! <td> ! Primary ! Index ! Unique ! None ! Fulltext ! </td> ! </tr> ! </cfoutput> ! </cfloop> ! </table> ! </fieldset> ! ! <!---||| SQL Preview |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">SQL Preview</legend> ! Needs to be developed: Show Alter Table command that is about to be executed<br /> ! Create "Update SQL Preview" Button, to refresh Preview Box ! </fieldset> ! ! <!---||| Submit Request |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Run Alter Table Query</legend> ! <!---***Insert a query box of the SQL that is about to be executed***---> ! <input name="AddFields" type="submit" value="Add Fields as Defined Above"> ! </fieldset> ! </cfform> </cflock> |
From: <nan...@us...> - 2003-05-29 03:49:46
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv15705/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 745318 ] Continued Development of dbProcessBody/AddField.cfm Added Columns: -Field Options -Default Value -Index Added onChange="this.form.submit()" event listeners to: -Number of New Fields Text Box -Location of New Fields Select Box -Field Type Select Boxes The onChange event will reload the form and display any new fields/rows based on new selection Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AddField.cfm 27 May 2003 04:15:39 -0000 1.2 --- AddField.cfm 29 May 2003 03:42:06 -0000 1.3 *************** *** 23,27 **** <!---||| Set the default value to the last requested value |||---> <label for="numberOfFields" class="Fancy">Number of New Fields:</label> ! <cfinput name="numberOfFields" type="text" value="#FORM.numberOfFields#" size="2" maxlength="2" range="1,99" required="yes" message="You must enter an interger between 1 and 99 for the number of records field." validate="integer" class="Fancy" /> <br /> --- 23,27 ---- <!---||| Set the default value to the last requested value |||---> <label for="numberOfFields" class="Fancy">Number of New Fields:</label> ! <cfinput name="numberOfFields" type="text" value="#FORM.numberOfFields#" size="2" maxlength="2" range="1,99" required="yes" message="You must enter an interger between 1 and 99 for the number of records field." validate="integer" class="Fancy" onChange="this.form.submit()" /> <br /> *************** *** 29,33 **** <!---||| Set the selected option to the last requested value |||---> <label for="locationOfFields" class="Fancy">Location of New Fields:</label> ! <cfselect name="locationOfFields" size="1" required="yes" class="Fancy"> <!---||| Create options for adding the new field(s) at the beginning and at the end of the current table |||---> <cfif FORM.locationOfFields IS "End"> --- 29,33 ---- <!---||| Set the selected option to the last requested value |||---> <label for="locationOfFields" class="Fancy">Location of New Fields:</label> ! <cfselect name="locationOfFields" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> <!---||| Create options for adding the new field(s) at the beginning and at the end of the current table |||---> <cfif FORM.locationOfFields IS "End"> *************** *** 62,66 **** <td><label class="Fancy">Field Name:</label></td> <td><label class="Fancy">Field Type:</label></td> ! </tr> --- 62,68 ---- <td><label class="Fancy">Field Name:</label></td> <td><label class="Fancy">Field Type:</label></td> ! <td><label class="Fancy">Field Options:</label></td> ! <td><label class="Fancy">Default Value:</label></td> ! <td><label class="Fancy">Index:</label></td> </tr> *************** *** 72,116 **** <!--- Print Row Number ---> <td><label class="Fancy">#i#</label></td> ! <!--- Allow User to Specify the Fields Name ---> ! <!---***Add validate="regular_expression" to above, to ensure user entered a valid field name***---> ! <td><cfinput name="fieldName#i#" type="text" value="" size="40" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /></td> ! <!--- Allow User to Select Field Type ---> <td> ! <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy"> ! <option value="Empty" selected class="Fancy"></option> <optgroup label="String" class="Fancy"> ! <option value="VARCHAR" class="Fancy">VARCHAR(m)</option> ! <option value="CHAR" class="Fancy">CHAR(m)</option> ! <option value="TINYBLOB" class="Fancy">TINYBLOB</option> ! <option value="BLOB" class="Fancy">BLOB</option> ! <option value="MEDIUMBLOB" class="Fancy">MEDIUMBLOB</option> ! <option value="LONGBLOB" class="Fancy">LONGBLOB</option> ! <option value="TINYTEXT" class="Fancy">TINYTEXT</option> ! <option value="TEXT" class="Fancy">TEXT</option> ! <option value="MEDIUMTEXT" class="Fancy">MEDIUMTEXT</option> ! <option value="LONGTEXT" class="Fancy">LONGTEXT</option> ! <option value="ENUM" class="Fancy">ENUM(v1,v2,...)</option> ! <option value="SET" class="Fancy">SET(v1,v2,...)</option> </optgroup> <optgroup label="Numeric" class="Fancy"> ! <option value="TINYINT" class="Fancy">TINYINT(m)</option> ! <option value="SMALLINT" class="Fancy">SMALLINT(m)</option> ! <option value="MEDIUMINT" class="Fancy">MEDIUMINT(m)</option> ! <option value="INT" class="Fancy">INT(m)</option> ! <option value="BIGINT" class="Fancy">BIGINT(m)</option> ! <option value="FLOAT" class="Fancy">FLOAT(m,d)</option> ! <option value="DOUBLE" class="Fancy">DOUBLE(m,d)</option> ! <option value="DECIMAL" class="Fancy">DECIMAL(m,d)</option> </optgroup> <optgroup label="Date Time" class="Fancy"> ! <option value="DATE" class="Fancy">DATE</option> ! <option value="TIME" class="Fancy">TIME</option> ! <option value="DATETIME" class="Fancy">DATETIME</option> ! <option value="YEAR" class="Fancy">YEAR</option> ! <option value="TIMESTAMP" class="Fancy">TIMESTAMP(m)</option> </optgroup> </cfselect> </td> </tr> </cfoutput> --- 74,340 ---- <!--- Print Row Number ---> <td><label class="Fancy">#i#</label></td> ! ! <!---||| Allow User to Specify the Fields Name |||---> ! <!--- Set a default value of empty string ---> ! <cfparam name="FORM.fieldName#i#" default="" /> ! <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> ! <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> ! <td><cfinput name="fieldName#i#" type="text" value="#Evaluate("FORM.fieldName#i#")#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /></td> ! ! <!---||| Allow User to Select Field Type |||---> ! <!--- Set a default value of empty string ---> ! <cfparam name="FORM.fieldType#i#" default="" /> <td> ! <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> ! <!--- Check to see if empty option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS ""> ! <option value="Empty" selected class="Fancy"></option> ! <cfelse> ! <option value="Empty" class="Fancy"></option> ! </cfif> <optgroup label="String" class="Fancy"> ! <!--- Check to see if VARCHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "VARCHAR"> ! <option value="VARCHAR" selected class="Fancy">VARCHAR(m)</option> ! <cfelse> ! <option value="VARCHAR" class="Fancy">VARCHAR(m)</option> ! </cfif> ! ! <!--- Check to see if CHAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "CHAR"> ! <option value="CHAR" selected class="Fancy">CHAR(m)</option> ! <cfelse> ! <option value="CHAR" class="Fancy">CHAR(m)</option> ! </cfif> ! ! <!--- Check to see if TINYBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYBLOB"> ! <option value="TINYBLOB" selected class="Fancy">TINYBLOB</option> ! <cfelse> ! <option value="TINYBLOB" class="Fancy">TINYBLOB</option> ! </cfif> ! ! <!--- Check to see if BLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BLOB"> ! <option value="BLOB" selected class="Fancy">BLOB</option> ! <cfelse> ! <option value="BLOB" class="Fancy">BLOB</option> ! </cfif> ! ! <!--- Check to see if MEDIUMBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMBLOB"> ! <option value="MEDIUMBLOB" selected class="Fancy">MEDIUMBLOB</option> ! <cfelse> ! <option value="MEDIUMBLOB" class="Fancy">MEDIUMBLOB</option> ! </cfif> ! ! <!--- Check to see if LONGBLOB option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGBLOB"> ! <option value="LONGBLOB" selected class="Fancy">LONGBLOB</option> ! <cfelse> ! <option value="LONGBLOB" class="Fancy">LONGBLOB</option> ! </cfif> ! ! <!--- Check to see if TINYTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYTEXT"> ! <option value="TINYTEXT" selected class="Fancy">TINYTEXT</option> ! <cfelse> ! <option value="TINYTEXT" class="Fancy">TINYTEXT</option> ! </cfif> ! ! <!--- Check to see if TEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TEXT"> ! <option value="TEXT" selected class="Fancy">TEXT</option> ! <cfelse> ! <option value="TEXT" class="Fancy">TEXT</option> ! </cfif> ! ! <!--- Check to see if MEDIUMTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMTEXT"> ! <option value="MEDIUMTEXT" selected class="Fancy">MEDIUMTEXT</option> ! <cfelse> ! <option value="MEDIUMTEXT" class="Fancy">MEDIUMTEXT</option> ! </cfif> ! ! <!--- Check to see if LONGTEXT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "LONGTEXT"> ! <option value="LONGTEXT" selected class="Fancy">LONGTEXT</option> ! <cfelse> ! <option value="LONGTEXT" class="Fancy">LONGTEXT</option> ! </cfif> ! ! <!--- Check to see if ENUM option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "ENUM"> ! <option value="ENUM" selected class="Fancy">ENUM(v1,v2,...)</option> ! <cfelse> ! <option value="ENUM" class="Fancy">ENUM(v1,v2,...)</option> ! </cfif> ! ! <!--- Check to see if SET option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SET"> ! <option value="SET" selected class="Fancy">SET(v1,v2,...)</option> ! <cfelse> ! <option value="SET" class="Fancy">SET(v1,v2,...)</option> ! </cfif> </optgroup> <optgroup label="Numeric" class="Fancy"> ! <!--- Check to see if TINYINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TINYINT"> ! <option value="TINYINT" selected class="Fancy">TINYINT(m)</option> ! <cfelse> ! <option value="TINYINT" class="Fancy">TINYINT(m)</option> ! </cfif> ! ! <!--- Check to see if SMALLINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "SMALLINT"> ! <option value="SMALLINT" selected class="Fancy">SMALLINT(m)</option> ! <cfelse> ! <option value="SMALLINT" class="Fancy">SMALLINT(m)</option> ! </cfif> ! ! <!--- Check to see if MEDIUMINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "MEDIUMINT"> ! <option value="MEDIUMINT" selected class="Fancy">MEDIUMINT(m)</option> ! <cfelse> ! <option value="MEDIUMINT" class="Fancy">MEDIUMINT(m)</option> ! </cfif> ! ! <!--- Check to see if INT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "INT"> ! <option value="INT" selected class="Fancy">INT(m)</option> ! <cfelse> ! <option value="INT" class="Fancy">INT(m)</option> ! </cfif> ! ! <!--- Check to see if BIGINT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "BIGINT"> ! <option value="BIGINT" selected class="Fancy">BIGINT(m)</option> ! <cfelse> ! <option value="BIGINT" class="Fancy">BIGINT(m)</option> ! </cfif> ! ! <!--- Check to see if FLOAT option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "FLOAT"> ! <option value="FLOAT" selected class="Fancy">FLOAT(m,d)</option> ! <cfelse> ! <option value="FLOAT" class="Fancy">FLOAT(m,d)</option> ! </cfif> ! ! <!--- Check to see if DOUBLE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DOUBLE"> ! <option value="DOUBLE" selected class="Fancy">DOUBLE(m,d)</option> ! <cfelse> ! <option value="DOUBLE" class="Fancy">DOUBLE(m,d)</option> ! </cfif> ! ! <!--- Check to see if DECIMAL option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DECIMAL"> ! <option value="DECIMAL" selected class="Fancy">DECIMAL(m,d)</option> ! <cfelse> ! <option value="DECIMAL" class="Fancy">DECIMAL(m,d)</option> ! </cfif> </optgroup> <optgroup label="Date Time" class="Fancy"> ! <!--- Check to see if DATE option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATE"> ! <option value="DATE" selected class="Fancy">DATE</option> ! <cfelse> ! <option value="DATE" class="Fancy">DATE</option> ! </cfif> ! ! <!--- Check to see if TIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIME"> ! <option value="TIME" selected class="Fancy">TIME</option> ! <cfelse> ! <option value="TIME" class="Fancy">TIME</option> ! </cfif> ! ! <!--- Check to see if DATETIME option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "DATETIME"> ! <option value="DATETIME" selected class="Fancy">DATETIME</option> ! <cfelse> ! <option value="DATETIME" class="Fancy">DATETIME</option> ! </cfif> ! ! <!--- Check to see if YEAR option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "YEAR"> ! <option value="YEAR" selected class="Fancy">YEAR</option> ! <cfelse> ! <option value="YEAR" class="Fancy">YEAR</option> ! </cfif> ! ! <!--- Check to see if TIMESTAMP option was selected, and reselect it accordingly ---> ! <cfif Evaluate("FORM.fieldType#i#") IS "TIMESTAMP"> ! <option value="TIMESTAMP" selected class="Fancy">TIMESTAMP(m)</option> ! <cfelse> ! <option value="TIMESTAMP" class="Fancy">TIMESTAMP(m)</option> ! </cfif> </optgroup> </cfselect> </td> + <!---||| Allow User to Enter Field Options |||---> + <!--- Set a default values of empty string ---> + <cfparam name="FORM.length#i#" default="" /> + <cfparam name="FORM.displayWidth#i#" default="" /> + <cfparam name="FORM.autoIncrement#i#" default="" /> + <cfparam name="FORM.unsigned#i#" default="" /> + <cfparam name="FORM.zerofill#i#" default="" /> + <cfparam name="FORM.notNull#i#" default="" /> + <cfparam name="FORM.binary#i#" default="" /> + <td valign="middle"> + <!---||| Show Available Field Options Based on Selected Field Type |||---> + <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> + <cfcase value="VARCHAR,CHAR"> + <nobr><label class="Fancy">Length(</label><cfinput name="length#i#" type="text" value="#Evaluate("FORM.length#i#")#" size="3" maxlength="3" range="0,255" required="yes" message="The legal range for length is 0-255. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> + <nobr><cfinput name="binary#i#" type="checkbox" /><label for="binary#i#" class="Fancy">BINARY</label></nobr><br /> + <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> + </cfcase> + <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> + <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> + </cfcase> + <cfcase value="ENUM,SET"> + Enum,Set: Needs to be developped<br /> + <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> + </cfcase> + <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT"> + <nobr><label class="Fancy">Display Width(</label><cfinput name="displayWidth#i#" type="text" value="#Evaluate("FORM.displayWidth#i#")#" size="2" maxlength="2" range="1,20" message="The legal range for Display Width is 1-20. Please correct this field for row number #i#." validate="integer" class="Fancy" /><label class="Fancy">)</label></nobr><br /> + <nobr><cfinput name="autoIncrement#i#" type="checkbox" /><label for="autoIncrement#i#" class="Fancy">AUTO_INCREMENT</label></nobr><br /> + <nobr><cfinput name="unsigned#i#" type="checkbox" /><label for="unsigned#i#" class="Fancy">UNSIGNED</label></nobr><br /> + <nobr><cfinput name="zerofill#i#" type="checkbox" /><label for="zerofill#i#" class="Fancy">ZEROFILL</label></nobr><br /> + <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> + </cfcase> + <cfcase value="FLOAT,DOUBLE,DECIMAL"> + FLOAT,DOUBLE,DECIMAL: Needs to be developped<br /> + <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> + </cfcase> + <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> + DATE,TIME,DATETIME,YEAR,TIMESTAMP: Needs to be developped<br /> + <nobr><cfinput name="notNull#i#" type="checkbox" /><label for="notNull#i#" class="Fancy">NOT NULL</label></nobr> + </cfcase> + <cfdefaultcase><label class="Fancy">Select a Field Type to see Field Options</label></cfdefaultcase> + </cfswitch> + </td> + + <!---||| Allow User to Enter a Default Value for the Field Unless fieldType is BLOB or TEXT |||---> + <td> + <cfswitch expression="#Evaluate("FORM.fieldType#i#")#"> + <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> + <label class="Fancy">BLOB and TEXT field types can not have default values.</label> + </cfcase> + <cfdefaultcase><cfinput name="default#i#" value="#Evaluate("FORM.default#i#")#" type="text" size="20" required="no" class="Fancy" /></cfdefaultcase> + </cfswitch> + + + </td> + + <!---||| Allow User to Specify a Single Column Index |||---> + <td> + Primary + Index + Unique + None + Fulltext + </td> </tr> </cfoutput> |
From: <nan...@us...> - 2003-05-27 04:15:48
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv17372/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 744013 ] Developed large portion of AddField FORM in dbProcessBody/AddField.cfm Some work still remains Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AddField.cfm 25 May 2003 16:19:00 -0000 1.1 --- AddField.cfm 27 May 2003 04:15:39 -0000 1.2 *************** *** 4,9 **** * Purpose: Displays the Body Content for the AddField Database Process * * Requiremets: -fieldList Query must be run on same page prior to including this template * ! * -FORM.table (table name) must have been passed from calling template * ********************************************************************************************---> ! Add Field \ No newline at end of file --- 4,128 ---- * Purpose: Displays the Body Content for the AddField Database Process * * Requiremets: -fieldList Query must be run on same page prior to including this template * ! * -URL.table (table name) must have been passed from calling template * ********************************************************************************************---> ! <!---||| Set Default Values |||---> ! <cfparam name="FORM.numberOfFields" default="1" /> ! <cfparam name="FORM.locationOfFields" default="End" /> ! <cfdump var="number of fields: #FORM.numberOfFields# location of fields: #FORM.locationOfFields#"> ! ! <!---||| Initiate a Read Only lock to ensure the integrity of session variables |||---> ! <cflock timeout = "30" throwontimeout="no" type = "readonly" scope = "session"> ! <!---||| Create AddField FORM |||---> ! <cfform action="#currentPath#?#SESSION.URLToken#&dbProcess=AddField&table=#URL.table#" method="post" name="FORM_AddField" enablecab="yes" class="Fancy"> ! <!---||| General Settings (number of new fields, location of new fields) |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Add New Field(s) to Table <cfoutput>#URL.table#</cfoutput></legend> ! ! <!---||| Allow User to Specify the Number of New Fields |||---> ! <!---||| Set the default value to the last requested value |||---> ! <label for="numberOfFields" class="Fancy">Number of New Fields:</label> ! <cfinput name="numberOfFields" type="text" value="#FORM.numberOfFields#" size="2" maxlength="2" range="1,99" required="yes" message="You must enter an interger between 1 and 99 for the number of records field." validate="integer" class="Fancy" /> ! <br /> ! ! <!---||| Allow User to Specify the Location for the New Fields |||---> ! <!---||| Set the selected option to the last requested value |||---> ! <label for="locationOfFields" class="Fancy">Location of New Fields:</label> ! <cfselect name="locationOfFields" size="1" required="yes" class="Fancy"> ! <!---||| Create options for adding the new field(s) at the beginning and at the end of the current table |||---> ! <cfif FORM.locationOfFields IS "End"> ! <option value="End" selected class="Fancy">At End of Table <cfoutput>#URL.table#</cfoutput></option> ! <cfelse> ! <option value="End" class="Fancy">At End of Table <cfoutput>#URL.table#</cfoutput></option> ! </cfif> ! <cfif FORM.locationOfFields IS "Beginning"> ! <option value="Beginning" selected class="Fancy">At Beginning of Table <cfoutput>#URL.table#</cfoutput></option> ! <cfelse> ! <option value="Beginning" class="Fancy">At Beginning of Table <cfoutput>#URL.table#</cfoutput></option> ! </cfif> ! ! <!---||| Create options for adding the new field(s) after each of the current fields |||---> ! <cfoutput query="fieldList"> ! <cfif FORM.locationOfFields IS fieldList.FIELD> ! <option value="#fieldList.FIELD#" selected class="Fancy">After #fieldList.FIELD#</option> ! <cfelse> ! <option value="#fieldList.FIELD#" class="Fancy">After #fieldList.FIELD#</option> ! </cfif> ! </cfoutput> ! </cfselect> ! </fieldset> ! ! <!---||| Field Definitions |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Field Definitions</legend> ! <table width="100%" border="1" cellpadding="2" cellspacing="0"> ! <!---||| Create Header |||---> ! <tr> ! <td><label class="Fancy">Field No:</label></td> ! <td><label class="Fancy">Field Name:</label></td> ! <td><label class="Fancy">Field Type:</label></td> ! ! </tr> ! ! <!---||| Set up a new table row for each field user needs to define |||---> ! <cfloop from="1" to="#FORM.numberOfFields#" index="i"> ! <cfoutput> ! <!--- Alternate the Row Colours from class style Odd to class style Even ---> ! <tr class="#IIF(i MOD 2, DE('Odd'), DE('Even'))#"> ! <!--- Print Row Number ---> ! <td><label class="Fancy">#i#</label></td> ! <!--- Allow User to Specify the Fields Name ---> ! <!---***Add validate="regular_expression" to above, to ensure user entered a valid field name***---> ! <td><cfinput name="fieldName#i#" type="text" value="" size="40" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /></td> ! <!--- Allow User to Select Field Type ---> ! <td> ! <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy"> ! <option value="Empty" selected class="Fancy"></option> ! <optgroup label="String" class="Fancy"> ! <option value="VARCHAR" class="Fancy">VARCHAR(m)</option> ! <option value="CHAR" class="Fancy">CHAR(m)</option> ! <option value="TINYBLOB" class="Fancy">TINYBLOB</option> ! <option value="BLOB" class="Fancy">BLOB</option> ! <option value="MEDIUMBLOB" class="Fancy">MEDIUMBLOB</option> ! <option value="LONGBLOB" class="Fancy">LONGBLOB</option> ! <option value="TINYTEXT" class="Fancy">TINYTEXT</option> ! <option value="TEXT" class="Fancy">TEXT</option> ! <option value="MEDIUMTEXT" class="Fancy">MEDIUMTEXT</option> ! <option value="LONGTEXT" class="Fancy">LONGTEXT</option> ! <option value="ENUM" class="Fancy">ENUM(v1,v2,...)</option> ! <option value="SET" class="Fancy">SET(v1,v2,...)</option> ! </optgroup> ! <optgroup label="Numeric" class="Fancy"> ! <option value="TINYINT" class="Fancy">TINYINT(m)</option> ! <option value="SMALLINT" class="Fancy">SMALLINT(m)</option> ! <option value="MEDIUMINT" class="Fancy">MEDIUMINT(m)</option> ! <option value="INT" class="Fancy">INT(m)</option> ! <option value="BIGINT" class="Fancy">BIGINT(m)</option> ! <option value="FLOAT" class="Fancy">FLOAT(m,d)</option> ! <option value="DOUBLE" class="Fancy">DOUBLE(m,d)</option> ! <option value="DECIMAL" class="Fancy">DECIMAL(m,d)</option> ! </optgroup> ! <optgroup label="Date Time" class="Fancy"> ! <option value="DATE" class="Fancy">DATE</option> ! <option value="TIME" class="Fancy">TIME</option> ! <option value="DATETIME" class="Fancy">DATETIME</option> ! <option value="YEAR" class="Fancy">YEAR</option> ! <option value="TIMESTAMP" class="Fancy">TIMESTAMP(m)</option> ! </optgroup> ! </cfselect> ! </td> ! ! </tr> ! </cfoutput> ! </cfloop> ! </table> ! </fieldset> ! ! <!---||| Submit Request |||---> ! <fieldset class="Fancy"> ! <legend class="Fancy">Run Alter Table Query</legend> ! <!---***Insert a query box of the SQL that is about to be executed***---> ! <input name="AddFields" type="submit" value="Add Fields as Defined Above"> ! </fieldset> ! </cfform> ! </cflock> \ No newline at end of file |
From: <nan...@us...> - 2003-05-27 04:03:17
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv13998/dbProcessInit Added Files: AddField.cfm Log Message: Functionality Added: [ 744006 ] Added File dbProcessInit/AddField.cfm - Calls Custom Tag Query/fieldList.cfm Included dbProcessInit/AddField.cfm in Initialization Switch of MyDatabasePilot.cfm --- NEW FILE: AddField.cfm --- <!---******************************************************************************************* * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * * Template: dbProcessInit/AddField.cfm * * Purpose: Initialize AddField Database Process * ********************************************************************************************---> <!---||| Get List of Field Names and Their Properties |||---> <!--- Initiate a Read Only lock to ensure the integrity of session variables ---> <cflock timeout=20 throwontimeout="no" type="readonly" scope="SESSION"> <!--- Invoke fieldList Custom Tag via CFModule ---> <cfmodule template="../Query/fieldList.cfm" queryName="fieldList" datasource="#SESSION.dataSource#" username="#SESSION.userName#" password="#SESSION.password#" table="#URL.table#"> </cflock> |