title: Geo distance Search MYSQL
body: <p>I'm doing a geo search with mysql using the spatial extension. FOr that i did a stored procedure (thats work really well when i tri on command line in mysql like that</p>
  
  <blockquote>
    <p>mysql> CALL
    test2(GeomFromText('POINT(-0.93961472
    43.52843475)'),0.6 );</p>
  </blockquote>
  
  <pre><code>DROP PROCEDURE `test2`//
  CREATE DEFINER=`root`@`localhost` PROCEDURE `test2`(IN center2 point,IN dist int)
  BEGIN
  SET @center = center2;
  SET @radius = dist;
  
  SET @bbox = CONCAT('POLYGON((', 
   X(@center) - @radius, ' ', Y(@center) - @radius, ',', 
   X(@center) + @radius, ' ', Y(@center) - @radius, ',', 
   X(@center) + @radius, ' ', Y(@center) + @radius, ',', 
   X(@center) - @radius, ' ', Y(@center) + @radius, ',', 
   X(@center) - @radius, ' ', Y(@center) - @radius, '))' 
  );
  
  SELECT professionnels.*, AsText(coord) 
  FROM professionnels 
  WHERE Intersects( coord, GeomFromText(@bbox) ) 
  AND SQRT(POW( ABS( X(coord) - X(@center)), 2) + POW( ABS(Y(coord) - Y(@center)), 2 )) &lt; @radius limit 20;
  end
  </code></pre>
  
  <p>But the problem is that i need to call that from php. and when i do it, an error is return said that </p>
  
  <blockquote>
    <p>PROCEDURE test2 can't return a result
    set in the given context</p>
  </blockquote>
  
  <p>So.. How can i use a turn around to return a set of data ?</p>
  
  <p>Thanks</p>