So I created a stored procedure in phpMyAdmin named Ratio_Viewer
. It takes in one parameter which is a stock ticker. I tested it in phpMyAdmin and I received the correct tuples. Now I am trying to incorporate that into my php files. I have a page where you enter a ticker and it takes you to another page which is supposed to display you the data based upon the stock ticker you entered. Nothing is getting returned. My code is:
require 'connection.php';
$sql = "CALL Ratio_Viewer('" . $_REQUEST["ticker"] . "')";
if(!$result = $mysqli->query($sql)) {
echo "error: " . $mysqli->error . "<br>";
exit;
}
echo ($result->fetch_assoc());