functions in the sql.php file added to a new library file name sql.lib.php