d22d5078ffadb754b5170383f19ddc8d htmlphp lab6 v2 rasb14 2017-10-21 16:29:48 v2.3.8 (2017-10-19)
Generated 2017-10-21 18:29:48 by dbwebb lab-utility v2.3.8 (2017-10-19).
In this lab you will be working with a SQLite database file: myDB.sqlite and PDO.
Do not forget to check the PHP Manual on PDO
The database has one table called people.
The table ‘people’ has six columns:
id,firstName,lastName,born,cityOfBirth,countryOfBirth.
Find the firstnames of the people born in England. Answer with an array containing their names.
Find the first name and last name of the person born 1962.
Answer with a string in the format: "Firstname Lastname".
Sum the years the persons with the lastnames Hanks and Bloom were born. Answer with an integer.
Count the number of entries in the table people. Answer with an integer.
Find which country (countryOfBirth) the oldest person was born in. Answer with a string.
What is the average value of the column born? Answer with an integer.
Find the youngest person born in USA. Which city is he/she born in? Answer with a string.
These questions are worth 3 points each. Solve them for extra points.
Get the first name and lastname of all persons in the database. Order them by their last name, alphabetically and ascending.
Answer with an array of strings, like this:
["lastName firstName", "lastName firstName"].
d22d5078ffadb754b5170383f19ddc8d