Good question, there aren't exactly any good tools that interweave several languages into the same environment. Not just for php-mysql but also for php-html or html-javascript or php-javascript. Phpstorm gives you intellisense for sql-strings embedded in your php code but that's the most advanced cross-language-feature i've seen, except for LINQ in C#.
Imagine a tool that could analyze this:
//sql table T having columns int x, string y
//php
$data = sql_fetch_from_column(T)
//javascript
var d = <?=json_encode($data)?>
for(a in d)
var b = a.x / a.y; //Type error, int division by string not defined
Imagine a tool that could analyze this: