php and mysql proc
<p>If php code like below how it's like as mysql store procedure equvilant.If any links tutorial on advance store proc mysql please put.</p>

<pre><code>$sql=" SELECT  a,b FROM  j ";
$result=mysql_query($sql);
if(mysql_num_rows($result) &gt; 0 ) { 
  while($row=mysql_fetch_array($result)) { 
    $sql_update="UPDATE b set a=".$row['a']."'";  
    mysql_query($sql_update);
  }
}
</code></pre>
