If this is a CGI application, you're going to want to check out prepare_cached(). If you're going to do SELECT statements, see also bind_columns() and fetch().
------ We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.