Always it depends on last mysql versions support is better for stored procedures, views, joins.
MySQL really sucks on complex querys i like Oracle Or MSSQL community versions.
On current version of PHP two options to manage PDO or mysqli extension, if you are sure of db never migrated to other manager choose MySQLi in other case choose PDO.
SELECT from the DB using complex query, use it for output and calculations in PHP, Store result in the dB. MySQL is really good at reading and slow on writing if not doing it properly. It does the job.
I love SQL, it's not to complicated but you can get any level of complication you want.
As long as you know what you do and optimize you are going to be fine. if you are getting problems developing you can use a program like Checkmarx to detect any code vulnerabilities and fix them.