#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" % MySQL tests3Xv1 MySQL tests  ULucida Grande cREVGeneralscriptChecksumُ B~ debugObjects bookmarks handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript

 Pon clearAll put "" into fld "db ID" put "" into fld "Table ID" put "" into fld "Tables" put "" into fld "Desc ID" put "" into fld "Describe" put "" into fld "Select ID" put "" into fld "Select" put "" into fld "Select headers" put "" into fld "SQL" put "" into fld "Query" put "" into fld "Exec result" put "" into fld "New headers" put "" into fld "New record" put "" into fld "Counter" end clearAll function getConnectID put fld "db ID" into dbID if dbID is empty then send mouseUp to btn "Connect" put fld "db ID" into dbID if dbID is empty then beep answer error "Can't connect to database." return "" end if end if return dbID end getConnectID 1 cREVGeneralscriptChecksumOғA>)" bookmarks handlerListclearAll getConnectID tempScript prevHandlerclearAllscriptSelectionchar 242 to 241script

on clearAll

put "" into fld "db ID"

put "" into fld "Table ID"

put "" into fld "Tables"

put "" into fld "Desc ID"

put "" into fld "Describe"

put "" into fld "Select ID"

put "" into fld "Select"

put "" into fld "Select headers"

put "" into fld "SQL"

put "" into fld "Query"

put "" into fld "Exec result"

put "" into fld "New headers"

put "" into fld "New record"

put "" into fld "Counter"

end clearAll

function getConnectID

put fld "db ID" into dbID

if dbID is empty then

send mouseUp to btn "Connect"

put fld "db ID" into dbID

if dbID is empty then

beep

answer error "Can't connect to database."

return ""

end if

end if

return dbID

end getConnectID

  $% !"# db pathi`f cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1030147405748 handlerListscriptSelection char 1 to 0 prevHandlermouseUp tempScriptscript

 db ID ` : cREVGeneral revUniqueID 1030147416060  ConnectEpon mouseUp put fld "db user" into dbUser put fld "db pass" into dbPass put fld "db path" into dbName put fld "db address" into dbAddr if dbAddr is empty then put "localhost" into dbAddr put revOpenDatabase("MySQL",dbAddr,dbName,dbUser,dbPass) into dbresult if dbresult is a number then put dbresult into fld "db ID" else answer dbResult end if end mouseUp ' d cREVGeneralscriptChecksumws[BƩ.uz bookmarks revUniqueID 1030147470687 handlerListmouseUpscriptSelectionchar 385 to 384 prevHandlermouseUp tempScriptscript

on mouseUp

put fld "db user" into dbUser

put fld "db pass" into dbPass

put fld "db path" into dbName

put fld "db address" into dbAddr

if dbAddr is empty then put "localhost" into dbAddr

put revOpenDatabase("MySQL",dbAddr,dbName,dbUser,dbPass) into dbresult

if dbresult is a number then

put dbresult into fld "db ID"

else

answer dbResult

end if

end mouseUp

 New Field 1 d cREVGeneral revUniqueID 1030148627680 Database name:  New Field 1  _ cREVGeneral revUniqueID 1030148627680 Connection ID:CloseEpon mouseUp put revOpenDatabases() into connectList repeat for each item c in connectList revCloseDatabase c end repeat clearAll end mouseUp ')d cREVGeneralscriptChecksum&S6aKV뛓/Q bookmarks revUniqueID 1030148514095 handlerListmouseUpscriptSelectionchar 129 to 128 prevHandlermouseUp tempScriptscript

on mouseUp

put revOpenDatabases() into connectList

repeat for each item c in connectList

revCloseDatabase c

end repeat

clearAll

end mouseUp

 List tablesEpon mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put "SHOW TABLES;" into dbQuery put revQueryDatabase(dbID, dbQuery) into curID put curID into fld "Table ID" if curID is not a number then answer error "Query failed:" & cr & curID exit mouseUp end if put revNumberOfRecords(curID) into recNum put revDatabaseColumnCount(curID) into colNum put empty into fld "Tables" revMoveToLastRecord curID repeat recNum times repeat with c = 1 to colNum put revDatabaseColumnNumbered(curID, c) & cr before fld "Tables" end repeat revMoveToPreviousRecord curID if the result = false then exit repeat end repeat delete last char of fld "Tables" revCloseCursor curID end mouseUp ~d cREVGeneral scriptChecksumպ'3!q=`" breakPoints handlerListmouseUpscriptSelection char 83 to 82 revUniqueID 1030148799372 bookmarks tempScript prevHandlermouseUpscript

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put "SHOW TABLES;" into dbQuery

put revQueryDatabase(dbID, dbQuery) into curID

put curID into fld "Table ID"

if curID is not a number then

answer error "Query failed:" & cr & curID

exit mouseUp

end if

put revNumberOfRecords(curID) into recNum

put revDatabaseColumnCount(curID) into colNum

put empty into fld "Tables"

revMoveToLastRecord curID

repeat recNum times

repeat with c = 1 to colNum

put revDatabaseColumnNumbered(curID, c) & cr before fld "Tables"

end repeat

revMoveToPreviousRecord curID

if the result = false then exit repeat

end repeat

delete last char of fld "Tables"

revCloseCursor curID

end mouseUp

 Table ID `H cREVGeneral revUniqueID 1030149305310  Describe tableEpon mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName put "DESCRIBE " & tableName & ";" into dbQuery put revQueryDatabase(dbID, dbQuery) into curID put curID into fld "Desc ID" if curID is not a number then answer error "Query failed:" & cr & curID exit mouseUp end if put revNumberOfRecords(curID) into recNum put revDatabaseColumnCount(curID) into colNum put empty into fld "Describe" lock screen revMoveToLastRecord curID repeat recNum times put empty into tRec repeat with c = 1 to colNum put revDatabaseColumnNumbered(curID, c) & tab after tRec end repeat put tRec & cr before fld "Describe" revMoveToPreviousRecord curID if the result = false then exit repeat end repeat delete last char of fld "Describe" revCloseCursor curID end mouseUp ~d cREVGeneralscriptChecksum h7;X9ǫo bookmarks revUniqueID 1030148799372 handlerListmouseUpscriptSelectionchar 659 to 658 prevHandlermouseUp tempScriptscript R

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

put "DESCRIBE " & tableName & ";" into dbQuery

put revQueryDatabase(dbID, dbQuery) into curID

put curID into fld "Desc ID"

if curID is not a number then

answer error "Query failed:" & cr & curID

exit mouseUp

end if

put revNumberOfRecords(curID) into recNum

put revDatabaseColumnCount(curID) into colNum

put empty into fld "Describe"

lock screen

revMoveToLastRecord curID

repeat recNum times

put empty into tRec

repeat with c = 1 to colNum

put revDatabaseColumnNumbered(curID, c) & tab after tRec

end repeat

put tRec & cr before fld "Describe"

revMoveToPreviousRecord curID

if the result = false then exit repeat

end repeat

delete last char of fld "Describe"

revCloseCursor curID

end mouseUp

Desc ID `NH cREVGeneral revUniqueID 1030149305310  ExecuteEpon mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put fld "SQL" into dbSQL if last char of dbSQL = ";" then delete last char of dbSQL revExecuteSQL dbID, dbSQL put the result into sqlResult if sqlResult is a number then put "Query OK: " & sqlResult & " record(s) altered." into fld "Exec result" else put sqlResult into fld "Exec result" end if end mouseUp d cREVGeneralscriptChecksumׇBbb)"r\ bookmarks revUniqueID 1030151524841 handlerListmouseUpscriptSelectionchar 414 to 413 prevHandlermouseUp tempScriptscriptR

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put fld "SQL" into dbSQL

if last char of dbSQL = ";" then delete last char of dbSQL

revExecuteSQL dbID, dbSQL

put the result into sqlResult

if sqlResult is a number then

put "Query OK: " & sqlResult & " record(s) altered." into fld "Exec result"

else

put sqlResult into fld "Exec result"

end if

end mouseUp

 Exec result `R cREVGeneral revUniqueID 1030152681903  SelectEpon mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put fld "Query" into theSQL if theSQL is empty then answer error "Please enter a query." exit mouseUp end if if word 1 of theSQL is not in "SELECT,SHOW" then put "SELECT " before theSQL if last char of theSQL <> ";" then put ";" after theSQL put theSQL into fld "Query" put revQueryDatabase(dbID, theSQL) into curID if curID is not a number then put "Error" into fld "Select ID" put curID into fld "Select" exit mouseUp end if put curID into fld "Select ID" lock screen put revDatabaseColumnCount(curID) into colNum put empty into fld "Select" put revDatabaseColumnNames(curID) into colNames replace comma with tab in colNames put colNames into fld "Select headers" replace tab with cr in colNames put colNames into fld "New headers" put empty into fld "New record" put revNumberOfRecords(curID) into recNum put recNum into fld "Counter" -- revMoveToLastRecord curID if recNum > 0 then repeat recNum times put empty into tRec repeat with c = 1 to colNum -- put revDatabaseColumnNamed(curID, line c of colNames) & tab after tRec put revDatabaseColumnNumbered(curID, c) & tab after tRec end repeat put tRec & cr after fld "Select" -- revMoveToPreviousRecord curID revMoveToNextRecord curID if the result = false then exit repeat end repeat end if delete last char of fld "Select" revCloseCursor curID end mouseUp d cREVGeneralscriptChecksumύ& P[V revUniqueID 1030148799372 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 1326 to 1325script

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put fld "Query" into theSQL

if theSQL is empty then

answer error "Please enter a query."

exit mouseUp

end if

if word 1 of theSQL is not in "SELECT,SHOW" then put "SELECT " before theSQL

if last char of theSQL <> ";" then put ";" after theSQL

put theSQL into fld "Query"

put revQueryDatabase(dbID, theSQL) into curID

if curID is not a number then

put "Error" into fld "Select ID"

put curID into fld "Select"

exit mouseUp

end if

put curID into fld "Select ID"

lock screen

put revDatabaseColumnCount(curID) into colNum

put empty into fld "Select"

put revDatabaseColumnNames(curID) into colNames

replace comma with tab in colNames

put colNames into fld "Select headers"

replace tab with cr in colNames

put colNames into fld "New headers"

put empty into fld "New record"

put revNumberOfRecords(curID) into recNum

put recNum into fld "Counter"

-- revMoveToLastRecord curID

if recNum > 0 then

repeat recNum times

put empty into tRec

repeat with c = 1 to colNum

-- put revDatabaseColumnNamed(curID, line c of colNames) & tab after tRec

put revDatabaseColumnNumbered(curID, c) & tab after tRec

end repeat

put tRec & cr after fld "Select"

-- revMoveToPreviousRecord curID

revMoveToNextRecord curID

if the result = false then exit repeat

end repeat

end if

delete last char of fld "Select"

revCloseCursor curID

end mouseUp

 Select ID `:H cREVGeneral revUniqueID 1030149305310  EditEpon mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName put the hilitedLine of fld "Select" into lineNum if lineNum is empty then answer error "Please select a record." exit mouseUp end if put line lineNum of fld "Select" into oldData replace tab with cr in oldData put fld "New headers" into theHeaders put the number of lines in theHeaders into headerCount put line 1 to headerCount of fld "New record" into newData repeat until the number of lines in newData = headerCount put cr after newData end repeat put "UPDATE " & tableName & " SET " into theSQL repeat for each line L in oldData if L is a number or L = "NULL" then put L & cr after fOldData else if L is not empty then put "'" & L & "'" & cr after fOldData else put cr after fOldData end repeat put fOldData into oldData repeat for each line L in newData if L is a number or L = "NULL" then put L & cr after fnewData else if L is not empty then put "'" & L & "'" & cr after fnewData else put "NULL" & cr after fnewData end repeat put fnewData into newData repeat with x = 1 to the number of lines in oldData if line x of oldData <> line x of newData then put line x of theHeaders & " = " & line x of newData & ", " after theUpdate end if if line x of oldData is not empty then put line x of theHeaders & " = " & line x of oldData & " and " after theSpecs end if end repeat delete char -2 to -1 of theUpdate delete char -5 to -1 of theSpecs put theUpdate & " WHERE (" & theSpecs & ");" after theSQL put theSQL into fld "SQL" send mouseUp to btn "Execute" send mouseUp to btn "Select" in 5 ticks end mouseUp t2 cREVGeneralscriptChecksummUśG bookmarks revUniqueID 1030153958940 handlerListmouseUpscriptSelectionchar 634 to 633 prevHandlermouseUp tempScriptscript

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

put the hilitedLine of fld "Select" into lineNum

if lineNum is empty then

answer error "Please select a record."

exit mouseUp

end if

put line lineNum of fld "Select" into oldData

replace tab with cr in oldData

put fld "New headers" into theHeaders

put the number of lines in theHeaders into headerCount

put line 1 to headerCount of fld "New record" into newData

repeat until the number of lines in newData = headerCount

put cr after newData

end repeat

put "UPDATE " & tableName & " SET " into theSQL

repeat for each line L in oldData

if L is a number or L = "NULL" then put L & cr after fOldData

else if L is not empty then put "'" & L & "'" & cr after fOldData

else put cr after fOldData

end repeat

put fOldData into oldData

repeat for each line L in newData

if L is a number or L = "NULL" then put L & cr after fnewData

else if L is not empty then put "'" & L & "'" & cr after fnewData

else put "NULL" & cr after fnewData

end repeat

put fnewData into newData

repeat with x = 1 to the number of lines in oldData

if line x of oldData <> line x of newData then

put line x of theHeaders & " = " & line x of newData & ", " after theUpdate

end if

if line x of oldData is not empty then

put line x of theHeaders & " = " & line x of oldData & " and " after theSpecs

end if

end repeat

delete char -2 to -1 of theUpdate

delete char -5 to -1 of theSpecs

put theUpdate & " WHERE (" & theSpecs & ");" after theSQL

put theSQL into fld "SQL"

send mouseUp to btn "Execute"

send mouseUp to btn "Select" in 5 ticks

end mouseUp

 AddEpon mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName put "INSERT INTO " & tableName & " VALUES (" into theSQL put fld "New record" into newRec if newRec is empty then exit mouseUp put empty into formatRec repeat for each line L in newRec if L is a number or L = "NULL" then put L & ", " after formatRec else put "'" & L & "', " after formatRec end repeat delete char -2 to -1 of formatRec put formatRec & ");" after theSQL put theSQL into fld "SQL" send mouseUp to btn "Execute" send mouseUp to btn "Select" end mouseUp 82Selection Descriptionfalse cREVGeneralscriptChecksum^RF bookmarks revUniqueID 1030153958940 handlerListmouseUpscriptSelectionchar 325 to 324 prevHandlermouseUp tempScriptscript

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

put "INSERT INTO " & tableName & " VALUES (" into theSQL

put fld "New record" into newRec

if newRec is empty then exit mouseUp

put empty into formatRec

repeat for each line L in newRec

if L is a number or L = "NULL" then put L & ", " after formatRec

else put "'" & L & "', " after formatRec

end repeat

delete char -2 to -1 of formatRec

put formatRec & ");" after theSQL

put theSQL into fld "SQL"

send mouseUp to btn "Execute"

send mouseUp to btn "Select"

end mouseUp

 New headers *R cREVGeneral revUniqueID 1030154290833 Select headers gd cREVGeneral revUniqueID 1030154866384 Counter `S: cREVGeneral bookmarks revUniqueID 1030157798094 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript   Add tableEp^on mouseUp go to stack "Table" set the label of btn "Do" to "Make the table" end mouseUp V cREVGeneralscriptChecksumWDC$mr8 bookmarks revUniqueID 1030320866598 handlerListmouseUpscriptSelection char 93 to 92 prevHandlermouseUp tempScriptscript

on mouseUp

go to stack "Table"

set the label of btn "Do" to "Make the table"

end mouseUp

 New Field 1 d cREVGeneral revUniqueID 1030148627680 User name: db useri`f cREVGeneralscriptChecksumُ B~ revUniqueID 1030147405748 bookmarks handlerList tempScript prevHandlermouseUpscriptSelection char 1 to 0script

  db addressi`fH cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1030147405748 handlerListscriptSelection char 1 to 0 prevHandlermouseUp tempScriptscript

  New Field 1 Hd cREVGeneral revUniqueID 1030148627680 Address:  New Field 3 `X< cREVGeneral revUniqueID 1030420394494 0leave empty if database is on your own computer Delete tableEpon mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName put "DROP TABLE " & tableName & ";" into fld "Query" send mouseUp to btn "Execute" send mouseUp to btn "List tables" end mouseUp xV cREVGeneralscriptChecksumǞ&EX2E revUniqueID 1030320866598 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 299 to 298script

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

put "DROP TABLE " & tableName & ";" into fld "Query"

send mouseUp to btn "Execute"

send mouseUp to btn "List tables"

end mouseUp

 Describe a@Hn,^ cREVGeneral revUniqueID 1030148797189  `F  New Field 2 n,^ cREVGeneral revUniqueID 1030245074632 "Field Type Null Key Default Extra Tables pon mouseUp put "SELECT * FROM " & the selectedtext of me into fld "Query" send mouseUp to btn "Select" send mouseUp to btn "Describe table" end mouseUp X cREVGeneralscriptChecksumdL>fCh bookmarks revUniqueID 1030148797189 handlerListmouseUpscriptSelection char 32 to 31 prevHandlermouseUp tempScriptscriptr

on mouseUp

put "SELECT * FROM " & the selectedtext of me into fld "Query"

send mouseUp to btn "Select"

send mouseUp to btn "Describe table"

end mouseUp

 `VAddEpMon mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName go to stack "Table" set the label of btn "Do" to "Add to the table" put tableName into fld "Table name" end mouseUp 8~2Selection Descriptionfalse cREVGeneralscriptChecksum"m/>g'E revUniqueID 1030153958940 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelection char 89 to 88scriptS

on mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

go to stack "Table"

set the label of btn "Do" to "Add to the table"

put tableName into fld "Table name"

end mouseUp

EditEpon mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName put the hilitedLine of fld "Describe" into lineNum if lineNum is empty then answer error "Please select a field." exit mouseUp end if set the itemDel to tab put item 1 to 2 of line lineNum of fld "Describe" into theField replace tab with space in theField put "ALTER TABLE " & tableName & " MODIFY " & theField & ";" into fld "SQL" answer "Edit the SQL command in the field at the bottom, then click 'Execute'" end mouseUp t~2 cREVGeneralscriptChecksumjtDg/& revUniqueID 1030153958940 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 651 to 650scriptI

on mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

put the hilitedLine of fld "Describe" into lineNum

if lineNum is empty then

answer error "Please select a field."

exit mouseUp

end if

set the itemDel to tab

put item 1 to 2 of line lineNum of fld "Describe" into theField

replace tab with space in theField

put "ALTER TABLE " & tableName & " MODIFY " & theField & ";" into fld "SQL"

answer "Edit the SQL command in the field at the bottom, then click 'Execute'"

end mouseUp

DeleteEp{on mouseUp put getConnectID() into dbID if dbID is empty then exit mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName put the hilitedLine of fld "Select" into lineNum if lineNum is empty then answer error "Please select a record." exit mouseUp end if put line lineNum of fld "Select" into oldData replace tab with cr in oldData put fld "New headers" into theHeaders put "DELETE FROM " & tableName into theSQL repeat for each line L in oldData if L is a number or L = "NULL" then put L & cr after fOldData else if L is not empty then put "'" & L & "'" & cr after fOldData end repeat put fOldData into oldData repeat with x = 1 to the number of lines in oldData put line x of theHeaders & " = " & line x of oldData & " and " after theSpecs end repeat delete char -5 to -1 of theSpecs put " WHERE (" & theSpecs & ");" after theSQL put theSQL into fld "SQL" send mouseUp to btn "Execute" send mouseUp to btn "Select" end mouseUp 2 cREVGeneralscriptChecksumWxRa-7" revUniqueID 1030153958940 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 1009 to 1008script 6

on mouseUp

put getConnectID() into dbID

if dbID is empty then exit mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

put the hilitedLine of fld "Select" into lineNum

if lineNum is empty then

answer error "Please select a record."

exit mouseUp

end if

put line lineNum of fld "Select" into oldData

replace tab with cr in oldData

put fld "New headers" into theHeaders

put "DELETE FROM " & tableName into theSQL

repeat for each line L in oldData

if L is a number or L = "NULL" then put L & cr after fOldData

else if L is not empty then put "'" & L & "'" & cr after fOldData

end repeat

put fOldData into oldData

repeat with x = 1 to the number of lines in oldData

put line x of theHeaders & " = " & line x of oldData & " and " after theSpecs

end repeat

delete char -5 to -1 of theSpecs

put " WHERE (" & theSpecs & ");" after theSQL

put theSQL into fld "SQL"

send mouseUp to btn "Execute"

send mouseUp to btn "Select"

end mouseUp

 DeleteEp^on mouseUp put the hilitedLine of fld "Tables" into lineNum if lineNum is empty then answer error "Please select a table." exit mouseUp end if put line lineNum of fld "Tables" into tableName put the hilitedLine of fld "Describe" into lineNum if lineNum is empty then answer error "Please select a field." exit mouseUp end if set the itemDel to tab put item 1 of line lineNum of fld "Describe" into fldName put "ALTER TABLE " & tableName & " DROP " & fldName & ";" into fld "SQL" send mouseUp to btn "Execute" send mouseUp to btn "Describe table" end mouseUp ~2 cREVGeneralscriptChecksum =eil'm bookmarks revUniqueID 1030153958940 handlerListmouseUpscriptSelectionchar 486 to 485 prevHandlermouseUp tempScriptscript

on mouseUp

put the hilitedLine of fld "Tables" into lineNum

if lineNum is empty then

answer error "Please select a table."

exit mouseUp

end if

put line lineNum of fld "Tables" into tableName

put the hilitedLine of fld "Describe" into lineNum

if lineNum is empty then

answer error "Please select a field."

exit mouseUp

end if

set the itemDel to tab

put item 1 of line lineNum of fld "Describe" into fldName

put "ALTER TABLE " & tableName & " DROP " & fldName & ";" into fld "SQL"

send mouseUp to btn "Execute"

send mouseUp to btn "Describe table"

end mouseUp

! New Field 1 8S| cREVGeneral revUniqueID 1030148627680 Matching records:"HelpEp-on mouseUp go to stack "Help" end mouseUp  ^& cREVGeneralscriptChecksumm$*7on mouseUp

go to stack "Help"

end mouseUp

Query)pAon enterInField send mouseUp to btn "Select" end enterInField |n0 cREVGeneralscriptChecksumWtKo3悟47 bookmarks revUniqueID 1030151521935 handlerList enterInFieldscriptSelection char 48 to 47 prevHandler enterInField tempScriptscript

on enterInField

send mouseUp to btn "Select"

end enterInField

 `. Select)qon mouseUp put the selectedText of me into theRec replace tab with cr in theRec put theRec into fld "New record" end mouseUp zjd cREVGeneralscriptChecksum|,@/Y{} bookmarks revUniqueID 1030148797189 handlerListmouseUpscriptSelectionchar 119 to 118 prevHandlermouseUp tempScriptscriptp

on mouseUp

put the selectedText of me into theRec

replace tab with cr in theRec

put theRec into fld "New record"

end mouseUp

 `{h  New record)z`on scrollbarDrag set the vScroll of fld "New headers" to the vScroll of me end scrollbarDrag L cREVGeneralscriptChecksump*Z8(_ bookmarks revUniqueID 1030153995795 handlerList scrollbarDragscriptSelection char 78 to 77 prevHandler scrollbarDrag tempScriptscript\

on scrollbarDrag

set the vScroll of fld "New headers" to the vScroll of me

end scrollbarDrag

  ` SQL)pBon enterInField send mouseUp to btn "Execute" end enterInField " cREVGeneralscriptChecksum_Yi0&P revUniqueID 1030151521935 bookmarks handlerList enterInField tempScript prevHandler enterInFieldscriptSelection char 49 to 48script

on enterInField

send mouseUp to btn "Execute"

end enterInField

 ` # New Field 1 3d cREVGeneral revUniqueID 1030148627680 Password: $db pass `@f3 cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1030147405748 handlerListscriptSelection char 1 to 0 prevHandlermouseUp tempScriptscript

 %db pass visibleipon closeField put me into fld "db pass" put the length of me into passLen put char 1 to passLen of "***************************" into me end closeField f2 cREVGeneralscriptChecksumo?1H1ѿ revUniqueID 1053498100362 bookmarks handlerList closeField tempScript prevHandlermouseUpscriptSelectionchar 143 to 142script

on closeField

put me into fld "db pass"

put the length of me into passLen

put char 1 to passLen of "***************************" into me

end closeField

 Table2Table ULucida Grande @      Field names)zon closeField

replace space with "" in me

end closeField

 Type 1 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick "Type 1TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum"aZNG revUniqueID 1030321141084 bookmarks handlerListmenuPick tempScript prevHandlermenuPickscriptSelectionchar 576 to 575script)

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

if it = "UNSIGNED" then

put space & it after pVar

end if

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & ")" after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Specs)j@R cREVGeneral revUniqueID 1030321100737   Type 2 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick 8Type 2TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

 Type 3 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick NType 3TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

 Type 4 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick dType 4TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

 Type 5 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick zType 5TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET  cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 6 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick Type 6TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET  cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 7 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick Type 7TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 8 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick Type 8TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 9 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick Type 9TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 10 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick Type 10TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 11 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick Type 11TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 12 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick Type 12TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 13 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick *Type 13TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 14 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick @Type 14TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

Type 15 u-- INT -- UNSIGNED ZEROFILL -- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL -- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL -- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL -- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS -- YEAR(SIZE) -- SIZE = 2 OR 4 -- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS -- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED) on menuPick pVar if pVar contains "Int" then answer "Signed?" with "UNSIGNED" or "SIGNED" if it = "UNSIGNED" then put space & it after pVar end if answer "Zerofill?" with "Yes" or "No" if it is "Yes" then put " ZEROFILL" after pVar end if else if pVar is in "FLOAT,DOUBLE,DECIMAL" then ask "Enter maximum size:" put "(" & it & comma after pVar ask "Enter decimal places:" put it & ")" after pVar else if pVar = "TIMESTAMP" then ask "How many characters of YYYYMMDDHHMMSS to store?" with 14 put "(" & it & ")" after pVar else if pVar = "YEAR" then answer "How many digits:" with "2" or "4" put "(" & it & ")" after pVar else if pVar contains "CHAR" then ask "Enter maximum size:" put "(" & it & ")" after pVar answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No" if it is "Yes" then put " BINARY" after pVar end if end if put last word of the short name of me into lineNum put pVar into line lineNum of fld "Specs" end menuPick VType 15TINYINT SMALLINT MEDIUMINT INT BIGINT - FLOAT DOUBLE DECIMAL - DATETIME DATE TIMESTAMP TIME YEAR - CHAR VARCHAR TINYTEXT TEXT MEDIUMTEXT LONGTEXT - TINYBLOB BLOB MEDIUMBLOB LONGBLOB - (ENUM (SET cREVGeneralscriptChecksum#뗓: ;j bookmarks revUniqueID 1030321141084 handlerListmenuPickscriptSelectionchar 804 to 803 prevHandlermenuPick tempScriptscript

-- INT -- UNSIGNED ZEROFILL

-- FLOAT(SIZE,D) -- UNSIGNED ZEROFILL

-- DOUBLE(SIZE,D) -- UNSIGNED ZEROFILL

-- DECIMAL(SIZE,D) -- UNSIGNED ZEROFILL

-- TIMESTAMP(SIZE) -- STORES AS MUCH OF YYYYMMDDHHMMSS AS SIZE ALLOWS

-- YEAR(SIZE) -- SIZE = 2 OR 4

-- CHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS

-- VARCHAR(SIZE) -- BINARY -- CAUSES CASE-SENSITIVE SORTS (VAR MEANS TRAILING SPACES ARE NOT STORED)

on menuPick pVar

if pVar contains "Int" then

answer "Signed?" with "UNSIGNED" or "SIGNED"

put space & it after pVar

answer "Zerofill?" with "Yes" or "No"

if it is "Yes" then

put " ZEROFILL" after pVar

end if

else if pVar is in "FLOAT,DOUBLE,DECIMAL" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

ask "Enter decimal places:"

put it & ")" after pVar

else if pVar = "TIMESTAMP" then

ask "How many characters of YYYYMMDDHHMMSS to store?" with 14

put "(" & it & ")" after pVar

else if pVar = "YEAR" then

answer "How many digits:" with "2" or "4"

put "(" & it & ")" after pVar

else if pVar contains "CHAR" then

ask "Enter maximum size:"

put "(" & it & comma after pVar

answer "Binary (allows case-sensitive sorts)?" with "Yes" or "No"

if it is "Yes" then

put " BINARY" after pVar

end if

end if

put last word of the short name of me into lineNum

put pVar into line lineNum of fld "Specs"

end menuPick

 Table name)pon closeField

replace space with "" in me

end closeField

  New Field 2 P cREVGeneral revUniqueID 1030323711566 Table name:Doepon mouseUp if fld "Table name" is empty then beep answer error "Please enter a table name" exit mouseUp end if if the label of me = "Make the table" then put "CREATE TABLE " & fld "Table name" & " (" into theSQL put fld "Field names" into theNames put fld "Specs" into theSpecs repeat with x = 1 to the number of lines in fld "Field names" if line x of theNames is empty or line x of theSpecs is empty then exit repeat put line x of theNames && line x of theSpecs & ", " after theSQL end repeat put ");" into char -2 to -1 of theSQL else put "ALTER TABLE " & fld "Table name" & " ADD " into theSQL put fld "Field names" into theNames put fld "Specs" into theSpecs repeat with x = 1 to the number of lines in fld "Field names" if line x of theNames is empty or line x of theSpecs is empty then exit repeat put line x of theNames && line x of theSpecs & ", " after theSQL end repeat put ";" into char -2 to -1 of theSQL end if save this stack close this stack go to stack "MySQL tests" put theSQL into fld "SQL" send mouseUp to btn "Execute" send mouseUp to btn "List tables" end mouseUp v"Make the table cREVGeneralscriptChecksumn\Y9p-#p bookmarks revUniqueID 1030323766016 handlerListmouseUpscriptSelectionchar 1031 to 1030 prevHandlermouseUp tempScriptscript

on mouseUp

if fld "Table name" is empty then

beep

answer error "Please enter a table name"

exit mouseUp

end if

if the label of me = "Make the table" then

put "CREATE TABLE " & fld "Table name" & " (" into theSQL

put fld "Field names" into theNames

put fld "Specs" into theSpecs

repeat with x = 1 to the number of lines in fld "Field names"

if line x of theNames is empty or line x of theSpecs is empty then exit repeat

put line x of theNames && line x of theSpecs & ", " after theSQL

end repeat

put ");" into char -2 to -1 of theSQL

else

put "ALTER TABLE " & fld "Table name" & " ADD " into theSQL

put fld "Field names" into theNames

put fld "Specs" into theSpecs

repeat with x = 1 to the number of lines in fld "Field names"

if line x of theNames is empty or line x of theSpecs is empty then exit repeat

put line x of theNames && line x of theSpecs & ", " after theSQL

end repeat

put ";" into char -2 to -1 of theSQL

end if

save this stack

close this stack

go to stack "MySQL tests"

put theSQL into fld "SQL"

send mouseUp to btn "Execute"

send mouseUp to btn "List tables"

end mouseUp

ClearEpon mouseUp put empty into fld "Table name" put empty into fld "Field names" put empty into fld "Specs" repeat with x = 1 to 15 set the label of btn ("Type " & x) to the short name of btn ("Type " & x) end repeat end mouseUp v" cREVGeneralscriptChecksum{2'1Ss revUniqueID 1030323766016 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 239 to 238script%

on mouseUp

put empty into fld "Table name"

put empty into fld "Field names"

put empty into fld "Specs"

repeat with x = 1 to 15

set the label of btn ("Type " & x) to the short name of btn ("Type " & x)

end repeat

end mouseUp

 Copy scriptsEpon mouseUp put the script of btn "Type 1" into s repeat with x = 2 to 15 set the script of btn ("Type " & x) to s end repeat end mouseUp |L cREVGeneralscriptChecksumкl@ R_Hp bookmarks revUniqueID 1030330007712 handlerListmouseUpscriptSelectionchar 116 to 115 prevHandlermouseUp tempScriptscript

on mouseUp

put the script of btn "Type 1" into s

repeat with x = 2 to 15

set the script of btn ("Type " & x) to s

end repeat

end mouseUp

Help33on resizeStack if the short name of this stack <> "Help" then exit resizeStack put the rect of this card into theRect set the rect of btn "Tabs" to theRect put 10 into item 1 of theRect put 32 into item 2 of theRect subtract 10 from item 3 of theRect subtract 32 from item 4 of theRect set the rect of fld "Data" to theRect set the loc of btn "Done" to (the width of this card div 2) & comma \ & the height of this card - 16 end resizeStack on preOpenCard set the menuHistory of btn "Tabs" to the number of this card end preOpenCard Xx Help  WLucida Grande WLucida Grande @ULucida Grande cREVGeneralscriptChecksum T > bookmarks handlerListresizeStack preOpenCard tempScript prevHandler resizeStackscriptSelectionchar 546 to 545scriptX

on resizeStack

if the short name of this stack <> "Help" then exit resizeStack

put the rect of this card into theRect

set the rect of btn "Tabs" to theRect

put 10 into item 1 of theRect

put 32 into item 2 of theRect

subtract 10 from item 3 of theRect

subtract 32 from item 4 of theRect

set the rect of fld "Data" to theRect

set the loc of btn "Done" to (the width of this card div 2) & comma \

& the height of this card - 16

end resizeStack

on preOpenCard

set the menuHistory of btn "Tabs" to the number of this card

end preOpenCard

General @  Installing @ New databases @  Using MySQL @  Web links @  cREVGeneral bookmarks handlerList tempScript prevHandlerscriptSelection char 1 to 0scriptNotes Pon openCard set the locktext of fld "Data" to false set the traversalOn of fld "Data" to true end openCard on closeCard set the locktext of fld "Data" to true set the traversalOn of fld "Data" to false end closeCard   cREVGeneralscriptChecksum%d쯁ڻz bookmarks handlerListopenCard closeCard tempScript prevHandler closeCardscriptSelection char 5 to 4script{

on openCard

set the locktext of fld "Data" to false

set the traversalOn of fld "Data" to true

end openCard

on closeCard

set the locktext of fld "Data" to true

set the traversalOn of fld "Data" to false

end closeCard

i" cREVGeneral revUniqueID 1030422970903Tabsu3on menuPick pCard go to card pCard end menuPick  =General Installing New databases Using MySQL Web links Notes cREVGeneralscriptChecksum{S7c٘92\ revUniqueID 1030422653691 bookmarks handlerListmenuPick tempScript prevHandlermenuPickscriptSelection char 37 to 36script

on menuPick pCard

go to card pCard

end menuPick

Data p7on linkClicked pLink revGoURL pLink end linkClicked @  cREVGeneralscriptChecksum%3zlo%4 revUniqueID 1030422667902 bookmarks handlerList linkClicked tempScript prevHandlerscriptSelection char 38 to 37script

on linkClicked pLink

revGoURL pLink

end linkClicked

 This utility is designed to help people get started with MySQL. As I use Mac OS X, most of the help is specific to that system, but if you have MySQL already installed, then you should be able to use this stack perfectly. VSkip to the "Using MySQL" section and you will see how to get going using this stack. The scripts use the new database commands that are only in Revolution version 2. If you want an older copy with the version 1 commands, let me know and I can email it directly. IIt should be easy to alter this to connect to any SQL database - the script in the "Connect" button is the only place where MySQL is specified. As I don't have access to any other database for testing purposes, I prefer to leave it this way, but if anyone can verify that it works with other databases, I'll make that an option. NEW: updated to handle editing bugs, where adding data to a previously NULL field didn't update and where setting the last field to NULL also failed. Now tested with Rev 2.1B2. @ vThis file provided as is for testing purposes only. If you have any suggestions or find any bugs, please let me know. Sarah Reichelt sarah@troz.net  FType any notes you want here. They will be saved when you click Done.  MySQL site:  http://www.mysql.com/  Documentation contents:  4http://www.mysql.com/documentation/mysql/bychapter/ 3 Good SQL tutorial:  Fhttp://www.dbbm.fiocruz.br/class/Lecture/d17/sql/jhoffman/sqltut.html E 9Site with specific information about MySQL for Mac OS X: 8 -http://www.entropy.ch/software/macosx/mysql/ , ;Sarah's Revolution Page (check for updates to this stack): : http://www.troz.net/Rev/   QOnce you have created a database, you can access it using this Revolution stack. Enter the database and click Connect. You can leave the user name and address fields blank if you are the main user and the database is on your own computer. I haven't tried multi-user or remote connections yet. uIf you haven't made a database (or don't want to), connect to "test". This is a blank database installed with MySQL. Once you have a connection, click "List Tables". This will give an error if there are no tables yet. Click on Add table, enter a table name. In the first column, enter the names of the data fields you want to use. In the corresponding popups, select the data type for each field. Answer any relevant questions. When ready, click Make the table and it will be created. Then click on List tables to show it. Click on the table name in the list and it's description will be displayed as well as any records in that table. You can delete the entire table, add new fields, delete or edit existing fields. Add just takes you back to the table creation window so you can specify more fields. Edit puts the SQL code for that field in the box at the bottom of the main window for manual editing. Then click Execute to make it happen. The Select button and the field beside it are for performing searches and any operations that produce a table. As far as I know, these are either SHOW or SELECT commands. Type in an SQL command and click Select or press Enter to perform it. You will get a list of results in the field underneath, or a report of any error in your command. If you get results, the number of matching records will also be displayed. .The Execute button and it's field are for commands that do not return a table i.e. CREATE, ALTER, DROP, INSERT, LOAD etc. Again, enter the command and click Execute or press Enter to perform the command. If it works, you will get a report in the field underneath stating how many records were changed.  If a Select has produced any records, you can click on a record to edit it. It will appear in the list on the right where any or all of the fields can be changed or the complete record can be deleted. To add a new record, enter the new data in the list and click Add. Note: in order for the various operations to work, a table and a sometimes a record must be selected. If this is not so, the operation will fail.  To create a new database:  =1. Open a terminal window and type in the following commands  (without the double quotes): %2. Type sudo "/usr/local/bin/mysql" "3. Enter your password when asked )4. Type "create database myDatabaseName" 15. If this works, you will get a message saying ( "Query OK, 1 row affected (0.00 sec)" ?6. If it didn't work, you may not have the sql daemon running. : Use step 6 in the installation instruction to start it. .7. To allow access to the new database, type: < "grant all on myDatabaseName.* to yourUsername@localhost"  All databases seem to live in the data folder which is in the /usr/local/mysql/ directory. It is hidden but you can get to it in the Finder by choosing "Go to folder..." then typing "/usr". This reveals the hidden usr folder and then you can navigate through the folders as normal. IBecause databases hold multiple tables, you don't need to do this often.  MySQL for Mac OS X  =1. Double-click on the mysql-x.xx.xx.pkg file to install it. =2. Open a terminal window and type in the following commands  (without the double quotes): 3. type "cd /usr/local/mysql" J4. type "sudo ./scripts/mysql_install_db", enter your password when asked 15. type "sudo chown -R mysql /usr/local/mysql/*" 06. type "sudo ./bin/safe_mysqld --user=mysql &" ; Press Enter after this to get back to the Terminal prompt : 4 You can switch to using Revolution at this point. 3  +7. Use it with "/usr/local/bin/mysql test" 9 This gives you Terminal access to all the SQL commands. 6 End each command with ; or type \g on the next line.  Type "exit" to get out.  wAfter performing the above steps, read section 4.3 of the manual carefully, it explains how to set up permissions etc. xImportant: You should at least run this command in order to secure the open master account in the default installation: 0mysqladmin -u root password new_password_here 8. If you would like MySQL to start up automatically when the system comes up, then you can install the mysql-startupitem.pkg package which puts a StartupItem into "/Library/StartupItems": ]Otherwise you will have to perform step 6 above every time you reboot and want to use MySQL.`!DoneEp=on mouseUp save this stack close this stack end mouseUp d cREVGeneralscriptChecksum]~b-"t4[ revUniqueID 1030422676491 bookmarks handlerListmouseUp tempScript prevHandlerscriptSelection char 48 to 47script

on mouseUp

save this stack

close this stack

end mouseUp