php+mysql:a simple library