UPDATE and INSERT differences in syntax is an inconvenience
<p>I was going through this article today. </p>

<p><a href="http://vinothbabu.com/2010/05/08/update-and-insert-differences-in-syntax-is-an-inconvenience/" rel="nofollow">http://vinothbabu.com/2010/05/08/update-and-insert-differences-in-syntax-is-an-inconvenience/</a></p>

<p>I was not able to understand this part of the code written by the author.</p>

<pre><code>    list($sets,$cols,$values)=escape_arr($sets);

    $insert_sql=”INSERT INTO `avatars` “.implode(’,',$cols).” 
    VALUES(”.implode(’,',$values).”)”;

    $update_sql=”UPDATE `avatars` SET “.implode(’,',$sets).”
    WHERE userid=$userid LIMIT 1″;
</code></pre>

<p>and finally the conclusion part of the article. </p>
