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:

  1. sid, first, last, and birthdate columns for all students
  2. all data for student whose sid is 818347712
  3. 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.
  4. 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.
  5. first, last, birthdate for students whose birthdate is more recent than January 1, 1960 Order the result by birthdate, last, first
  6. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!