This assignment is using SQL embedded in PHP to select record(s) according to the specified criteria. If you run into
problems check your text, online or some of my examples further on - or email me!
- Write the code where your select gets just one record by id and display three of the fields. Do not use a loop since
there is only one record
- Write the code where you select four fields from the records based on two conditions being true (AND relationship). Since there
will be multiple records potentially you need to use a loop.
- Write the code where you select three fields from the records where conditionA is always true and in addition either
conditionB or conditionC is true. You decide on the exact criteria but since there is the possibility of multiple records
you need to use a loop.
- Write the code to select conditionA and conditionB or conditionC and conditionD and order the results by a specific field.
Since you should do this to get multiple records, use a loop.
- Group by a field and show the count and the sum for each group. I want you to do this in a way where you will have more
than one group so use a loop.