Professional Documents
Culture Documents
Pseudocode
Pseudocode
//Structure that has members to use in gathering the inputs from users in regards to different
databases
Record databaseInputs
Begin
Declare
databaseInput,databaseInputTable as Integer
databaseInputName as string
End databaseInputs
//Structure that has a member to use in creating a name for the databases
Reocrd databaseName
Begin
Declare
name as string
End databaseName
//Structure that has members to use in creating user fields in a database table
Record userInformation
Begin
Declare
userFirstName as string
userSurname as string
userDOB as string
userEmail as string
userID as integer
numberOfUsers as integer
End userInformation
//Structure that has members that holds login information for users
Record userCredentails
Begin
Declare
userName as string
password as string
menuInput as integer
End userCredentials
//Structure that has members to use in the admin option selection menu
Record adminControls
Begin
Declare
adminInput as integer
adminInputDB as integer
adminInputUsers as integer
adminInputUsersDatabase as integer
adminInputUsersTable as integer
End adminControls
Record userControls
Begin
Declare
userInput, userInputDB as integer
userDBName,userdbtName as string
End userControls
wk as worksheet Record
jobsheet as jobsheet Record
dBI as databaseInputs Record
db as databaseName Record
dbt as databaseTables Record
userInfo as userInformation Record
user as userCredentials Record
admin as adminControls Record
u as userControls Record
//A function that prompts the user to enter a name to create a database
FUNCTION createDatabaseName
Begin
Print "Enter a name for the Database: "
Read db.name
End
//A function that prompts the user to enter a name to create a database table
FUNCTION createDatabaseTableName
Begin
Print "Enter a name for the table: "
Read dbt.name
End
//A function that checks to see if a mySQL query was executed with errors
FUNCTION finish_with_error(MYSQL * con)
Begin
Print mysql_error(con)
mysql_close(con)
End
FUNCTION mysqlConnection
Begin
if (con == NULL) then
Print mysql
l_error(con)
exit(1))
Endif
if (mysql_real_connect(con, "localhost", "root", "root", NULL, 0, NULL, 0) == NULL) then
then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
End
FUNCTION mysqlConnectionDatabase
Begin
MYSQL* con = mysql_init(NULL)
//A function that returns the list of available databases specifically for users, after hiding the
default mySQL databases
FUNCTION showDatabasesForUsers
Begin
MYSQL* con = mysql_init(NULL) then
Print stderr,mysql_error(con)
mysql_close(con)
exit(1)
Endif
MYSQL_RES* result = mysql_store_result(con)
num_fields as integer
num_fields = mysql_num_fields(result)
MYSQL_ROW row
finish_with_error(con)
Endif
Print "List of Databases"
Print " "
while ((row = mysql_fetch_row(result))) do
mysql_free_result(result)
mysql_close(con)
End
//A function that shows the list of available databases for the admin
FUNCTION showDatabases
Begin
MYSQL* con = mysql_init(NULL)
query as string
Print(query, "SHOW SCHEMAS")
MYSQL_ROW row
for 1 to num_fields do
Endfor
mysql_free_result(result)
mysql_close(con)
End
FUNCTION
finish_with_error(con)
Endif
query as string
Print "SHOW TABLES"
if (mysql_query(con, query)) Then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
MYSQL_ROW row
for 1 to num_field do
End
//A function that prompts the user to enter the name of a database that will be used in mySQL
queries
FUNCTION selectDatabase
Begin
Print "Select the name of the database to use ")
Read dBI.databaseInputName
End
//A function that prompts the user to enter the name of a database table that will be used in
mySQL queries
FUNCTION selectDatabaseTables
Begin
Print "Select the name of the Worksheet to use "
Read dbt.name
End
//A function that deletes a database table that was provided by the user
FUNCTION deleteDatabaseTables
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1)
Endif
if (mysql_real_connect(con, "localhost", "root", "root",
dBI.databaseInputName, 0, NULL, 0) == NULL) then then
finish_with_error(con)
Endif
query as string
Print(query, "DROP TABLE " dbt.name)
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
mysql_close(con)
End
//A function that shows the data of a database table that was provided by the user
FUNCTION showDatabaseTableData
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1)
Endif
if (mysql_real_connect(con, "localhost", "root", "root",
dBI.databaseInputName, 0, NULL, 0) == NULL) then then
finish_with_error(con)
Endif
query as string
Print query, "SELECT * FROM" dbt.name
if (mysql_query(con), query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
finish_with_error(con)
Endif
MYSQL_ROW row
MYSQL_FIELD* field
for 1 to num_field do
if (i == 0) then
while (field = mysql_fetch_field(result)) do
Print field->name
Endwhile
mysql_free_result(result)
mysql_close(con)
End
//A function that deletes a database that was provided by the user
FUNCTION deleteDatabase
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1)
Endif
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
query as string
Print(query, "DROP DATABASE ", dBI.databaseInputName)
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
mysql_close(con)
End
//A function that creates a database using a name provided by the user
FUNCTION createDatabase
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1)
Endif
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
query as string
Print(query, "CREATE DATABASE ", db.name)
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
mysql_close(con)
End
//A function that creates a database table using a name provided by the user
FUNCTION createTables
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1)
Endif
if (mysql_real_connect(con, "localhost", "root", "root",
dBI.databaseInputName, 0, NULL, 0) == NULL) then then
finish_with_error(con)
Endif
query as string
sPrint(query, "CREATE TABLE ", dbt.name, dbt.columnName, dbt.dataType)
if (mysql_query(con, query))
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
mysql_close(con)
End
//A function that returns the names of the columns from a database table
FUNCTION showColumns
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1)
Endif
if (mysql_real_connect(con, "localhost", "root", "root",
dBI.databaseInputName, 0, NULL, 0) == NULL) then
finish_with_error(con)
Endif
query as string
Print(query, "SHOW COLUMNS FROM ", dbt.name)
MYSQL_ROW row
MYSQL_FIELD* field
Endwhile
Endfor
Endwhile
Print " "
mysql_free_result(result)
mysql_close(con)
End
End
//A function that creates a database table with column names and data types
FUNCTION createTablesInput
Begin
MYSQL* con = mysql_init(NULL)
finish_with_error(con)
Endif
end
else if (strcmp(dbt.columnDataType, "VARCHAR") == 0) then
Begin
Print("Enter the size for", dbt.columnName,":"
Read dbt.columnDataSize
sPrint(dbt.dataType, "VARCHAR ", dbt.columnDataSize
createTables(
end
else if (strcmp(dbt.columnDataType, "DATE") == 0) then
sPrint(dbt.dataType, "DATE"
createTables(
Endif
mysql_close(con)
End
Print mysql_error(con)
exit(1)
Endif
if (mysql_real_connect(con, "localhost", "root", "root",
dBI.databaseInputName, 0, NULL, 0) == NULL) then
finish_with_error(con)
Endif
query as string
sPrint(query, "ADD ", dbt.columnName, dbt.columnDataType
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
mysql_close(con)
End
//A function that is called to insert the second column in a requested table
FUNCTION insertTableColumns2
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1
Endif
finish_with_error(con)
Endif
query as string
sPrint(query, "ALTER TABLE ADD COLUMN ", dbt.name, dbt.columnName, dbt.dataType
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1
Endif
mysql_close(con)
End
//A function that allows the user to make modifications to a database table
FUNCTION alterTables
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1
Endif
finish_with_error(con)
Endif
query as string
Print("Enter the modification to make to the table's column ADD, MODIFY, DROP: ")
Read dbt.alterTableQuery
if (strcmp(dbt.alterTableQuery, "ADD") == 0) then
Print("Enter the name of the column: "
Read dbt.columnName
Print("Enter the Data type of the column INT() , VARCHAR() , DATE , DECIMAL: "
Read dbt.columnDataType
if (strcmp(dbt.columnDataType, "INT") == 0) then
Begin
Print("Enter the size for : ", dbt.columnName
Read dbt.columnDataSize
sPrint(dbt.dataType, "INT(%i)", dbt.columnDataSize
end
end
else if (strcmp(dbt.columnDataType, "DATE") == 0) then
Begin
sPrint(dbt.dataType, "DATE")
end
Endif
sPrint(query, "ALTER TABLE ADD", dbt.name, dbt.columnName, dbt.dataType)
if (mysql_query(con, query)) then
begin
Print mysql_error(con)
mysql_close(con)
exit(1)
end
End
Endif
sPrint(query, "ALTER TABLE MODIFY ", dbt.name, dbt.columnName, dbt.dataType)
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
mysql_close(con)
End
Print mysql_error(con)
exit(1
Endif
if (mysql_real_connect(con, "localhost", "root", "root",
dBI.databaseInputName, 0, NULL, 0) == NULL) then
finish_with_error(con)
endif
for 1 to dbt.columns - 1 do
Print("Enter the name of the column: ")
Read dbt.columnName)
Print("Enter the Data type of the column INT() , VARCHAR() , DATE , DECIMAL: ")
Read dbt.columnDataType)
if (dbt.columnDataType == "INT") then
begin
Print("Enter the size for : ", dbt.columnName)
Read dbt.columnDataSize)
sPrint(dbt.dataType, "INT("dbt.columnDataSize")"
FUNCTION insertTableColumns2()
end
sPrint(dbt.dataType, "DATE")
FUNCTION insertTableColumns2()
Endif
Endfor
mysql_close(con)
End
//A function that gathers input from the user regarding the database table values to be passed
into a worksheet
FUNCTION insertTableValues
Begin
Print "Enter the amount of records you want to insert: "
Read wk.records
for 1 to wk.records do
Print "Enter the name of the person: "
Read wk.namePerson
Print "Enter the address of the person: "
Read wk.address
Print "Enter the telephone number of the person: "
Read wk.telephone
Print "Enter the date: "
Read wk.date
Print "Enter the email of the person: "
Read wk.email
Print "Enter the Job Number of the person: "
Read wk.jobNumber
Print "Enter the Contact Person: "
Read wk.contactPerson
Endfor
End
//A function that gathers input from the user regarding the database table values to be passed
into a worksheet
FUNCTION insertTableValues2
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1
Endif
query as string
Print mysql_error(con)
mysql_close(con)
exit(1)
endif
Endfor
mysql_close(con)
End
//A function that gathers input from the user regarding the database table values to be passed
into the user table that will hold the login credentials
FUNCTION insertTableValuesUsers
Begin
MYSQL* con = mysql_init(NULL)
Print mysql_error(con)
exit(1
Endif
finish_with_error(con)
Endif
query as string
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
Endfor
mysql_close(con)
End
//A function that searches the user login table and selects the password based on the ID
number provided
//it then stores the password inside of a variable that is authenticated with the password
provided
//by the user
FUNCTION userAuthentication()
Begin
MYSQL* con = mysql_init(NULL)
finish_with_error(con)
endif
query as string
sPrint(query, "SELECT PASSWORD FROM userinformation WHERE ID = ",
user.userName)
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
Endif
Num_fields as integer
num_fields = mysql_num_fields(result)
MYSQL_ROW row
Endif
mysql_free_result(result)
mysql_close(con)
End
//A function that gather the information that will be used to update the records in a database
table
FUNCTION updateTableValuesQuery()
Begin
Print "Enter the number of columns that will be used to update the records: "
Read dbt.columnNumber
for int i = 0 i < dbt.columnNumber ++i do
Print "Enter the name of the Column to use for updating the records: "
Read dbt.columnName
system "cls"
showDatabaseTableData
Print " "
Print "Enter the record value to update: "
Read dbt.query
Endfor
End
Fprint (mysql_error(con))
exit(1)
endif
finish_with_error(con)
endif
query as string
if (strcmp(dbt.columnName, "JobNumber") == 0) then
Sprint (query, "UPDATE SET WHERE = ")
else
Sprint (query, "UPDATE SET = '' WHERE ID = ", dbt.name, dbt.columnName, dbt.query)
Endif
mysql_close(con)
End
//A function that gathers the input from the user to use in deleting values from a database table
FUNCTION deleteTableValuesQuery()
Begin
Print "Enter the name of the Column to use for deletion: "
Read dbt.columnName
Print "Enter the name of the person to delete their record: "
Read wk.namePerson
End
Print mysql_error(con)
exit(1)
Endif
if (mysql_real_connect(con, "localhost", "root", "root",
dBI.databaseInputName, 0, NULL, 0) == NULL) then
finish_with_error(con)
Endif
query as string
sPrint(query, "DELETE FROM WHERE = ", dbt.name, dbt.columnName,
wk.namePerson)
if (mysql_query(con, query)) then
Print mysql_error(con)
mysql_close(con)
exit(1)
endif
mysql_close(con)
End
//A function that creates a files that will store the services provided in a jobsheet
FUNCTION servicesFileCreation()
Begin
FILE* filePointer
else
Fprint (filePointer, " ,", jb.subService)
Endif
fclose(filePointer)
End
//A function that appends to a file that will store the services provided in a jobsheet
FUNCTION servicesFileAppend()
Begin
FILE* filePointer
else
Fprint (filePointer, " " ," ", jb.subService)
Endif
fclose(filePointer)
End
//A function that stores the services provided
FUNCTION servicesFileStorage()
Begin
FILE* filePointer
End
//A function that presents the different types of jobsheet sub-services for the installation service
FUNCTION installationCase()
Begin
for 1 to 1 do
Print ("Carpet")
Print " "
Print ("Drapery")
Print " "
Print ("Blinds/Roller Shades")
Print " "
Print ("Enter Sub-Service : ")
Read (jb.subService)
servicesFileCreation()
Endfor
for 1 to jb.subServiceAmount - 1 do
Print ( "Carpet")
Print " "
Print ("Drapery")
Print " "
Print ("Blinds/Roller Shades")
Print " "
Print ("Enter Sub-Service : ")
Read ( jb.subService)
servicesFileAppend()
servicesFileStorage()
Sprint (jb.servicesQuery, "Installation of ", jb.services)
Endfor
End
//A function that presents the different types of jobsheet sub-services for the repair service
FUNCTION repairCase()
Begin
for 1 to 1 do
Print "Carpet"
Print " "
Print "Drapery"
Print " "
Print "Blinds/Roller Shades"
Print " "
Print "Enter Sub-Service : "
Read jb.subService
servicesFileCreation()
endfor
for 1 to jb.subServiceAmount - 1 do
Print "Carpet"
Print " "
Print "Drapery"
Print " "
print "Blinds/Roller Shades"
Print " "
Print "Enter Sub-Service : "
Read jb.subService
servicesFileAppend()
servicesFileStorage()
sPrint (jb.servicesQuery, "Repair of ", jb.services)
Endfor
End
//A function that presents the different types of jobsheet sub-services for the pest control service
FUNCTION pestControlCase()
Begin
For 1 to 1 do
Print "Spraying"
Print " "
Print "Bait/Paste "
Print " "
Print "Termite Treatment"
Print " "
Print "Enter Sub-Service : "
Read jb.subService
servicesFileCreation()
Endfor
for 1 to (jb.subServiceAmount - 1) do
Print "Spraying"
Print " "
Print "Bait/Paste"
Print " "
Print "Termite Treatment "
Print " "
Print "Enter Sub-Service : "
Read jb.subService
servicesFileAppend()
servicesFileStorage()
sPrint (jb.servicesQuery, "Pest Control of ", jb.services)
Endfor
End
//A function that presents the different types of jobsheet sub-services for the sanitation service
FUNCTION sanitationCase()
Begin
For 1 to 1 do
Print "Rug"
Print " "
Print "Carpet"
Print " "
Print "Drapery"
Print " "
Print "Blinds/Roller Shades"
Print " "
Print "Deep Clean"
Print " "
Print "Windows"
Print " "
Print "Vehicle Interior"
Print " "
Print "Tile Stipping "
Print " "
Print "Sofa/Settee"
Print " "
Print "Sanitization"
Print " "
Print "Partitions"
Print " "
Print "Office Chairs"
Print " "
Print "Dining Chairs"
Print " "
Print "Mattress"
Print " "
Print "Enter Sub-Service : "
Read jb.subService
servicesFileCreation()
Endfor
for 1 to jb.subServiceAmount - 1 do
Print "Rug"
Print " "
Print "Carpet"
Print " "
Print "Drapery"
Print " "
Print "Blinds/Roller Shades"
Print " "
Print "Deep Clean"
Print " "
Print "Windows "
Print " "
Print "Vehicle Interior "
Print " "
Print "Tile Stipping "
Print " "
Print "Sofa/Settee "
Print " "
Print "Sanitization "
Print " "
Print "Partitions "
Print " "
Print "Office Chairs "
Print " "
Print "Dining Chairs "
Print " "
Print "Mattress "
Print " "
Print "Enter Sub-Service : "
Read jb.subService
servicesFileAppend()
servicesFileStorage()
sPrint(jb.servicesQuery, "Cleaning/Sanitization of ", jb.services)
Endfor
End
fPrint(stderr, , mysql_error(con))
exit(1)
Endif
finish_with_error(con)
Endif
query as string
mysql_close(con)
End
//A function that prompts the user for the number of subservices, then calles the respective
function based on the service type
FUNCTION insertTableValuesJobsheet2()
end
else if (jb.serviceType == 2) then
begin
repairCase()
end
else if (jb.serviceType == 3) then
begin
pestControlCase()
end
else if (jb.serviceType == 4) then
begin
sanitationCase()
Endif
End
//A function that creates a files that will store the user database name provided by the admin
FUNCTION userDatabaseNameFileCreation()
FILE* filePointer
FILE* filePointer
//A function that creates a files that will store the user database table name provided by the
admin
FUNCTION userTableNameFileCreation()
FILE* filePointer
FILE* filePointer
//A function that authenticates the password provided by the user and calls the specific function
FUNCTION loginScreen()
Begin
Print "Username: "
Read user.userNAme
Print " "
Print "Password: "
Read user.password
if user.password = admin then
Print adminWelcomeScreen()
else
Print welcomescreen()
Endif
End
//A function that presents the different options for the admin
FUNCTION adminWelcomeScreenOption2()
End
//A function that presents the different options for the user
FUNCTION userEditWorksheetScreenOptions
Print"1) Add records "
Print " "
Print"2) Delete records"
Print " "
Print"3) Show Table Data"
Print " "
Print"4) Previous Page"
End
//A function that presents the different options for the user
FUNCTION userWelcomeScreenOption
Begin
FUNCTION CreateAccount()
Begin
system "cls"
Print "Account Creation"
Print "Enter your first name: "
Read userInfo.userFirstName
Print " "
Print "Enter your last name: "
Read userInfo.userSurname
Print " "
Print " Enter your Date of birth: "
Read userInfo.userDOB
Print " "
Print " Enter your email: "
Read userInfo.userEmail
End
FUNCTION welcomeScreen()
Begin
system "cls"
menu()
Print "Welcome", user.userName
Print "1) Create a worksheet"
Print "2) Edit a worksheet"
Print "3) Delete a worksheet"
Print "4) Create a jobsheet"
Print "5) Edit a jobsheet"
Print "6) Delete a jobsheet"
End
//A function that presents the different options for the admin
void adminWelcomeScreenOption1() {
system "cls"
print "1) Create a Database"
print "2) Delete Database "
print "3) View Databases "
print "4) Previous Page "
}
//A function that presents the different options for the admin
void adminWelcomeScreenOptions() {
//A function that presents the different options for the admin
void adminEditWorksheetScreenOptions() {
FUNCTION adminWelcomeScreen ()
Begin
system "cls"
menu()
Print "Welcome ", user.userName
Print "1) Modify Worksheets"
Print "2) Modify Jobsheets"
Print "3) Modify Users"
Read admin.adminInput
switch (admin.adminInput) {
case(1):
system"cls"
Print "1) Create a worksheet"
Print "2) Edit a worksheet"
Print "3) Delete a worksheet"
case (2):
Print "4) Create a jobsheet"
Print "5) Edit a jobsheet"
Print "6) Delete a jobsheet"
case (3):
Print "4) Create a User"
Print "5) Edit a User"
Print "6) Delete a User"
Endif
End
FUNCTION mainMenu()
Begin
system("cls")
startupMenu()
Print "MAIN MENU"
Print "1) Sign in"
Print "2) Sign up"
Print "3) EXIT"
Print "Enter your input here: "
Read &user.menuInput
switch(user.menuInput)
case(1):
loginScreen()
break
case(2):
createAccount()
case(3):
Print "Have A Nice Day!"
exit(0)
End
FUNCTION adminWelcomeScreen()
Begin
system"cls"
menu()
Print "Welcome", user.userName
Print "1) Modify Worksheets"
Print "2) Modify Jobsheets"
Print "3) Modify Users"
Read &admin.adminInput
switch (admin.adminInput)
case(1):
system("cls")
Print "1) Create a worksheet"
Print "2) Edit a worksheet"
Print "3) Delete a worksheet"
case (2):
Print "4) Create a jobsheet"
Print "5) Edit a jobsheet"
Print "6) Delete a jobsheet"
case (3):
Print "4) Create a User"
Print "5) Edit a User"
Print "6) Delete a User"
End
FUNCTION startupMenu ()
Begin
Declare comp_name as string
length as integer
length = sizeof(comp_name)/ sizeof(comp_name[0])
Print
"************************************************************************************************************
******************"
Print " ___ ___ ___ ___ ___ ________ ________ _______ ________
________ ________ _______"
sleep(200)
Print " | | || || || | | |___ ___| |___ ___| | ____| | | | | ______ | |
______| | ____|"
Sleep(200)
Print " || || | | | |____| | | | | | | |____ | _____| | | | | | |_____ ||
____ "
Sleep(200)
Print " || || | | | |____| | | | | | | ____| | | \\ \\ || | | |_____ | |
____|"
Sleep(200)
Print " | |____| |____| | | | | | ___| |___ | | | |____ | | \\ \\ | |____| |
_____| | | |____"
Sleep(200)
Print " |_______________| |_| |_| |________| |__| |______| |_| \\_\\ |
_______ | |_______ | |______|"
Print
"************************************************************************************************************
******************"
For i 1 to length do
Print comp_name[i]
Sleep(50)
Print " "
End
End
FUNCTION menu()
Begin
declare comp_name as string
length,i as integer
length = sizeof(comp_name)/sizeof(comp_name[0])
Print
"************************************************************************************************************
******************"
Print " ___ ___ ___ ___ ___ ________ ________ _______
________ ________ ________ _______ "
Print " || || || || | | |___ ___| |___ ___| | ____| | | | | ______ | |
______| | ____| "
Print " || || | | | |____| | | | | | | |____ | _____| | | | | | |_____ ||
____ "
Print " || || | | | |____| | | | | | | ____| | | \\ \\ || | | |_____ | |
____|"
Print " | |____| |____| | | | | | ___| |___ | | | |____ | | \\ \\ | |____| |
_____| | | |____"
Print " |_______________| |_| |_| |________| |__| |______| |_| \\_\\ |
_______ | |_______ | |______|"
Print
"************************************************************************************************************
******************"
for i to length do
Print comp_name[i]
FUNCTION main
Begin
Callup mainMenu
MYSQL* con = mysql_init(NULL)
mysql_close(con)
exit(0)
End