title: MySQL stored procedure PHP JSON response
body: <p>We have been building mobile applications with PHP playing the service layer interacting with  a MySQL database.I was thinking of going a little further to implement stored procedures in MySQL database to perform the task of fetching data.There by , removing any SQL from the PHP code.</p>
  
  <p>I did check online for related information , but could not find much.Following are some of my concerns :</p>
  
  <ul>
  <li>Can MySQL stored procedures return a user defined data type like a list? (Based on what I could search and find out , seems like these are accepted only as IN parameters).
  <ul>
  <li>Would returning the whole JSON formatted string (Yes , I know this would be little heavy) , have a negative impact on performance?</li>
  </ul></li>
  </ul>
  
  <p>I am relatively new to PHP , MySQL and mobile application development as well.Based on my past experience with Oracle PL/SQL , I assume writing the queries within the database would really be advantageous.</p>