Great, it's definitely helpful to have one of these. I like how you combined mysql_query and mysql_fetch_array into a single function.