Question: Create a php script file named db.php. This file will be included in your main script file. It does not need any special header information
Create a php script file named db.php. This file will be included in your main script file. It does not need any special header information for this class work assignment. Add code to db.php that connects to your database using a mysqli connection.
Create a second php script file named classWork3.php. Use include or require to bring in db.php and create the connection.
Create 5 queries to display the following:
- sid, first, last, and birthdate columns for all students
- all data for student whose sid is 818347712
- first, last, advisor (only the advisor's number is required but you can add name if you care to do so) for students whose advisor is 1.
- first, last, advisor (only the advisor's number is required but you can add name if you care to do so) for students whose advisor is 1 or 2.
- first, last, birthdate for students whose birthdate is more recent than January 1, 1960 Order the result by birthdate, last, first
- first, last, gpa for students whose gpa is between 3.0 and 4.0 Order the result by gpa
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
