Accessing MySQL Database
If you were only talking about accessing the database via PHP and ASP.net, then a stored procedure could serve as a common middle layer. Once you add the android and iphone applications into the equation, you're looking at having to design another middle layer. Reason for that it is most mobile devices don't have database drivers available to them.

In your case, you should build your middle layer in asp.net or PHP as a web service. Most are designing these web services as a REST API. You'll need to think about the information that your mobile apps need and build API endpoints for those things (users, posts, etc). I also recommend making your ASP.net and PHP site/application use the same API your mobile apps do. 

By setting up an API like this, you can reduce the work required for your apps. You're mobile app doesn't know that to get the latest 10 posts, it has to query SELECT * FROM posts order by create_date desc limit 10. It just has to make a request to http://myapi/posts/latest. 

There are several posts on Stack Overflow and Programmers.SE about setting up Web Service APIs, I recommend reviewing them.