There is good PHP tutorial at Peter Kantor's website, and also one at W3Schools.org.
To find in depth details of specific functions try PHP.net
For details of MySql both php.net and w3schools have sections describing database useage or go to the official MySql website