Database Name : studentdb
Create table students (student_id int(2), first_name varchar(30), last_name varchar(30), hrs_completed int(3), hrs_attempted int(3), gpa_points int(2), major varchar(50), advisor_id int(5), email varchar(256));
Insert into students values (1, 'Bhawani', 'Singh', 10, 8, 9, 'Science', 231, '[email protected]');
Create table advisors (advisor_id int(3), name varchar(256), email varchar(256));
Insert into advisors values (231, ‘Mr. Advisor’, ‘[email protected]’);
IMPORTANT NOTE : Advisor ID needs to match in both tables otherwise record display and insertion will fail through app user interface. Insert as many values are required.
$dsn = "mysql:host=172.30.37.79; port=3306 ;dbname=studentdb; charset=utf8";
$username = "dbadmin";
$password = "dbpassword";