Here are two lovely books about grammar. Both are really nice and functional: they’re easy to understand, funny to read, and packed full of useful stuff; and since I got my hands on them I’ve used them both almost every day.
English Grammar for Dummies, written by Lesley J Ward and Geraldine Woods, is an excellent reference to keep by your desk: it’s very thorough and explores just about everything about the subject that you’ll need to know.
My Grammar and I is smaller, and so more portable. Don’t assume that its small size makes it less useful: Caroline Taggart and J A Wines have squeezed a lot of information between those deliciously textured covers along with a good few jokes too. My only quibble is that this one could do with an index, as the table of contents doesn’t quite do it for me: but still. Two lovely books about grammar. Hours of fun for the writer and pedant. If you’re a writer, buy them both: you need a grammar reference, and these two are excellent.