Function Number: 4
Function Name: Search For A Guest
Link to Function ImplementationFunction Type: Query
Description: This function accepts any of the following as inputs: Guest First Name, Guest Last Name, Phone, or Email. This function returns a table containing records of any guests with matching search criteria.
Primary Users: Resort staff responsible for creating or managing reservations
Tables Affected: guests
Sample Input: Enter Guest First Name = 'Gordon'
Sample Output: [1, 'Gordon', 'Cole', '1954-08-09', '2103049879', 'gcole@fbi.gov', ' '. '935 Pennsylvania Avenue', 'Washington', 'D.C.', 'USA', '20535-00001']
Notes: This function uses the OR operator to query the table 'guests' for any records matching any of the entered search fields. If no results are found, mysqli_num_rows() will return zero and the user will be informed that no guests matching their search were found.
Main Menu