Database Reference
In-Depth Information
ities, though. If it is, skip this exercise and try again in the future when you're
much more experienced in using the API.
After you've verified that this API program makes backups correctly, have it con-
nect to MySQL to record that it has run successfully. Use the INSERT statement
to insert a row with the date the program ran and the name of the backup file it
created. When finished, run the program again and check the table in MySQL to
make sure it logged the information.
Once you're sure the API program works properly, add a line to cron or another
scheduling program to automatically execute the backup program you wrote. Set
it to run some time soon so you can verify it works with cron . You can remove it
from cron when you're finished.
4. Write an API program that will select a list of bird families to display to the user.
Devise a way for the user to select a bird family from the results to get a list of
birds in the family. If you're using an API program like PHP that may be used in
a web browser, create links for the bird families to take them to the same API pro-
gram to list the birds in the family selected.
If you're writing an API program that will be executed from the command line,
provide the user with the family_id next to the name of each bird family. In-
struct the user to run the program again, but with the family_id entered after
the command to get a list of the birds for a family chosen. Create the program in
such a way that if no family_id is entered, the user gets a list of families, but
if a family_id is entered, the user gets a list of birds in the family. Try running
the program to make sure it works properly.
Search WWH ::




Custom Search