Hi. I'm currently trying my hands on PHP and MySQL.
I understand how to retrieve results from SELECT statements in PHP? However, I'm not exactly sure of how to do it when a procedure call is made e.g.

$query = "CALL mach_validity($student_id, @result)";
[B]if[/B] ($result = $mysqli->query($query)
{ [B]while[/B]($row = $result->fetch_assoc())
   { $ returned_val =$row['@result']}
}

...(code continues)
1 row is expected from the CALL statement so there may be no need of the While Loop.
Can someone please help?

It's been helpful. I've decided to use IN parameters only while declaring local variables in the procedure to receive the values I need. I then add a SELECT statement of these variables within the procedure.Thank you for your help. It got me far.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.