unable to insert data into mysql database
<p>to save my web crawler position that how many pages it crawled i try to save them it in database so that next time it start from the position where it was stoped</p>

<p>first i have table checkpoint with 2 columns id and check</p>

<p>my first step is to get old position from database and store it in $i</p>

<pre><code>$result = mysql_query( "SELECT * FROM checkpoint" ) or die("SELECT Error: ".mysql_error());
while($ch_me = mysql_fetch_assoc($result))
{
    $i=$ch_me["check"];
            echo "&lt;br&gt;i value in loop ".$i;
            break;  // need just first check value in db
}
</code></pre>

<p>next i have to increment $i value and have to update it into database </p>

<pre><code>while(1)
{   // doing work 
    $i++;
    // save i value in database
    mysql_query("UPDATE `checkpoint` SET `id`=1,`check`=$i WHERE 1");
</code></pre>

<p>}</p>

<p>now problem i a facing is with update query ... it cant update $i value to databse ????? strage it was working for first time then when i run next time , not working </p>
