Question
1a. In a student information system web portal, we have StudDB as database and one of the tables is marks . This table has been
1a. In a student information system web portal, we have StudDB as database and one of the tables is marks. This table has been populated with the following data rows:
StudentID | FirstName | LastName | Mark |
1 | Fred | Jones | 78 |
2 | Bill | James | 67 |
3 | Carol | Smith | 82 |
4 | Bob | Dunca | 60 |
5 | Joan | Davis | 86 |
What will be the output when the following SQL commands are issued?
i. Select * from marks where StudentID>1 And StudentID<5;
ii. Select * from marks where marks>=80;
iii. Select * from marks order by mark DESC
iv. Select count(*) from marks;
v. Select sum(mark) from marks;
1b. Write a PHP program to connect to the database in 1a above and display the content of the marks table in a web browser.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started