With your interest focus, which is databases and CGI, I'd take a good look at the following two books. I've only had a quick skim through these books when I was browsing in the bookshops. They definitely looked to me to be among the better computer books. If I was shopping for that kind of books at the time, I think I would have bought them.
From what I gather, these books tend to be well-received, too.