Something doesn't look quite right about this Yahoo hack. Yahoo doesn't store MySQL passwords in PHP source code like that. Maybe he pulled these out of something else and wrote that file himself as an odd way to show he got the passwords?
Also, the apparent SQL injection is on a yahoo.net domain which Yahoo uses for untrusted third-party stuff mostly. The fact that the error seems to be from ASP is further evidence that this is very likely some third-party hosted app that doesn't actually have much to do with Yahoo and likely poses no danger to Yahoo users beyond the ones using this particular third-party service, whatever it is.