Using a function in mysql function and passing into database query : <p>I have a funnction called <strong>time_elapsed_string</strong> which converts the mysql function <strong>NOW()</strong> to another format.</p>

<p>How do I pass the function to the mysql function and use in a pdo statement.</p>

<pre><code>$lastseen = time_elapsed_string(NOW());
$query = $pdo-&gt;prepare("UPDATE users SET lastseen = 
:lastseen WHERE id=:id");
$query-&gt;bindParam(':id', $userid, PDO::PARAM_INT);
$query-&gt;bindParam(':lastseen', $lastseen);
$query-&gt;execute();
</code></pre>

<p>I get this error - <strong>Fatal error: Uncaught Error: Call to undefined function NOW()</strong></p>
