That is a very good question, it has been so long ago that I have to just point you to the mysql documentation site.
Here is the html version MySQL :: MySQL 5.1 Reference Manual
but you might be as well downloading the .chm help file locally in your own language: MySQL :: MySQL Documentation: MySQL Reference Manuals
Section 3 of the manual is a basic tutorial - but it does not have the exact degree of complexity that I remember.
Once you have worked through the examples in the manual, if you have any further questions you can ask here, or, ask in the dedicated sitepoint **mysql forum.
(**I am supposing that you are using mysql for your first attempts as using sql)
Once you have grasped the basics of how sql works and the basic terminology used you will be able to ask more focussed questions.
The basic principle with using the LAMP stack is that you make sure that your sql statements do what you expect, return the data you expect and then get PHP to interact with mysql on your behalf so that data is returned to your webpage matching your expectations.
The line between PHP and Mysql tends to get blurry when you are just starting out - so it is important to clearly separate them in your mind.
Paste a url and it looks up the page title - crikey that is new and clever, like that a lot!