Can I call a PHP function from within a MySQL query?
<p>I am quite new to PHP/MySQL and I would like to know whether it is possible to use a PHP function in a UPDATE statement, like this:</p>

<pre><code>&lt;?php
function myfun($a) {
   $a = $a + 1;
   return $a;
}

mysql_query("UPDATE `my_table` SET `myfield` = myfun(`par`)");
?&gt;
</code></pre>
