http://www.grammarbook.com/
I found the free online element of this site very useful for building my knowledge of grammar rules and so on. It turned out that I was aware of many of the principles but didn't know the correct phraseology for them.
The book itself was also useful and sits on my writing shelf for ready referrence.
One point of note is that its American English which differs slightly in rules from English English. If you want a book on the latter you'd be better off with "Eats Shoots and Leaves" by Lynne Truss, although the Blue book is easier to access.