Agreed Neptune. However, it should be wrapped in a class and the database control should be controlled by a master object for quick use. (phpBB3 DBAL, anyone? :P)