When I am learning something I get pretty discouraged by the books available. They are too long and too damned expensive. I will buy a 400 page book for 50 bucks and read the 30 pages I need. So, I wrote an e-book called MySQL and PHP an Introduction and published it on Amazon (Link here). It is 9.99, about 60 pages and comes with a complete web application. I just today added some real world examples. It demonstrates how to do things like sub queries, in clauses, not in clauses and when they are useful.
Click here to view the samples and working web application.