title: Return array in stored function
body: <p>I am trying to use the result of a stored function in a WHERE statement in MySQL (5.x), but it fails because in the function I am selecting values from a table into an INT variable and then returning them/it, which obviously doesn't work if the SELECT returns more than 1 row. I've tried returning a TABLE (as I understood TABLE means array in MySQL) but that didn't work either.</p>
  
  <p>Is there any way that I could do something like:</p>
  
  <pre><code>SELECT ID FROM myTable WHERE ID IN my_function(params);
  </code></pre>
  
  <p>Thank you.</p>