Hi man, well for example we will work with the following mysql procedure:
DELIMITER $$
DROP PROCEDURE IF EXISTS `ejemplos`.`queryEmployees` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `queryEmployees`(IN param VARCHAR(1))
BEGIN
IF param='1' THEN
SELECT * FROM empleados;
END IF;
END $$
DELIMITER ;
And we get the records in php as the following :
<?php
$mysqli = new mysqli('localhost', 'root', '1234', 'ejemplos');
$resultado_consulta = $mysqli->query("CALL queryEmployees('1')");
?>
<table>
<?php
while ($registro = $resultado_consulta->fetch_object())
{
?><tr><td><?php echo $registro->first_name;?> </td></tr><?php
}
?>
</table>
I hope this can help u...