Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include "functions.h"
int main() { // Main function to introduce data
timetable_db sqldb;
sqldb.create_table(); // Calling function to create table
sqldb.insert_student("1", "Joao"); // Inserting new Student data (ID, Name)
sqldb.insert_student("2", "Kylian");
sqldb.insert_lecturer("1", "Cristiano"); // Inserting new Lecturer data (ID, Name)
sqldb.insert_lecturer("2", "Lionel");
sqldb.insert_module("1", "Introdution to Work Ethic"); // Inserting new Module data (ID, Name)
sqldb.insert_module("2", "Dribble Engineering");
sqldb.insert_room("1", "Eusebio"); // Inserting new Room data (ID, Name)
sqldb.insert_room("2", "Maradona");
sqldb.insert_class("1", "8", "1", "1", "1", "1"); // Inserting new Class data (ID, Time, Room ID, Lecturer ID, Student ID, Module ID)
sqldb.insert_class("2", "5", "2", "2", "2", "2");
sqldb.show_db(); // Function to print Output
sqldb.close_db(); // Closing DB
return 0;
}