Web Development Support
    General Info   Cool Tools
    Getting Started   Troubleshooting
    Design & Promotion   Feedback
 

Search this site:


view site map

Web Databases
Examples of using Perl DBI with a MySQL database

The following pages provide examples that use the Perl DBI (Database Interface) with a MySQL database. For information on how to obtain an account on dbm1.itc.virginia.edu (ITC's MySQL database server) and the associated security concerns, please see:

http://www.itc.virginia.edu/desktop/web/mysql

For each of these examples, the database name is "mst3k_Inventory". If you would like to download your own copy of mst3k_Inventory, please see database instructions.

Each of the examples under "More formatting" uses a stylesheet for font definitions. You may obtain a copy of the stylesheet here.

Note: the DBI module is only available if you are using /uva/bin/perl. To see what your account default is for Perl, type "whence perl" on the Unix command line. If some other path is reported, you can make /uva/bin/perl your default interpreter by changing the PATH environment variable in your .variables.ksh file. Using your favorite editor on this file, modify the PATH assignment to read: "PATH=/uva/bin:$PATH". The change will take place on your next login to blue.unix.


Simple Queries

One-table query List of computers Minimal formatting More formatting
One-table query List of employees Minimal formatting More formatting
Multi-table query Inventory Minimal formatting More formatting


Query based on user input

Pick from a list Select an employee Minimal formatting More formatting
Drop down menu Select an employee Minimal formatting More formatting


Inserting data into the database

Input form Add a new computer Minimal formatting More Formatting
Input form Add a new employee Minimal formatting More formatting
Input form Add a new
inventory record
Minimal formatting More formatting

Web Development Support | General Info | Getting Started | Design & Promotion
Cool Tools | Troubleshooting | Feedback

If you need further assistance with Web applications or questions, send e-mail to web-consult@virginia.edu or call the ITC Help Desk at 924-3731.

 

© 2008 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology and Communication (ITC) website is provided as a public service with the understanding that ITC makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.