I am trying to set the two outputs from this MySQL stored procedure as PHP variables:
$result = mysql_query("CALL mst2('$q', @eset, @leng)");
if (!$result) {
die('Invalid query: ' . mysql_error());
}
while($row = @mysql_fetch_assoc($result))
{
debug($row);
}
$eset = $row->{'@eset'};
$length= $row->{'@leng'};
The last two line are throwing an error Trying to get property of non-object . Does anybody know the proper way to do this?
Here’s how I got it to work with
mysql_query:right after the procedure I called a
SELECTstatement, then in the while loop, the $eset variable gets set properly.