The AddedBytes cheat sheet above covers multiple php topics such as functions list and regular expressions.
If you would rather not download a php cheat sheet, BlueShoes has provided an online php cheat sheet available for you to access at anytime.
Above you will find a helpful and quick online guide to basic and slightly complex MySQL commands.
If you’re looking for a full fledged MySQL cheat sheet, look no further. The cheat sheet above (again, by AddedBytes) contains MySQL native functions, php MySQL functions, MySQL data types, and MySQL sample queries.
The WikiBook MySQL Cheat Sheet is an open and member contributed online MySQL guide. It has the advantage of constantly being updated as the database languages evolves.