how to show procedure output in php
<p>i am a php beginer. i want to call a mysql procedure and display the output rows returned by the procedure. the code is below</p>

<p><strong>mysql</strong></p>

<pre><code>delimiter //



     create procedure get_ques_list(in p_ques_ctgr varchar(10))

    begin

    select ques from question_list where ques_categorey=p_ques_ctgr
    order by ques;

end //
</code></pre>

<p>delimiter ;</p>

<p><strong>php code</strong></p>

<pre><code>$result=mysql_query("CALL GET_QUES_LIST('S_001')"); 


while($row=mysql_result($result,0,0))

{

    echo $row['ques'];  
}
</code></pre>

<p>but it is giving warning messgge </p>

<p><strong>Warning: mysql_result(): supplied argument is not a valid MySQL result resource in</strong></p>

<p><strong>but the same code works fine and display 5 rows if i use query instead of calling procedure</strong></p>

<pre><code>$result=mysql_query("select ques from question_list where 
ques_categorey='S_001' order by ques");
</code></pre>

<p>procedure is also working fine when executed in <code>mysql</code></p>

<p>can anyone tell where m going wrong in that??</p>

<p><strong>any help is appreciated</strong></p>
