Correct. If it&#39;s an auto_increment &quot;counter&quot;, then just specify NULL as the value for that column and it will handle the auto increment.<br><br><div class="gmail_quote">On Fri, Sep 3, 2010 at 2:47 PM, Eric Junker <span dir="ltr">&lt;<a href="mailto:eric@eric.nu">eric@eric.nu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On 9/3/2010 2:34 PM, Todd Walton wrote:<br>
&gt; I&#39;m wondering, if I need to do an INSERT INTO a table, and the table<br>
&gt; has a counter for a primary key, how do I handle setting the counter?<br>
&gt; I don&#39;t know beforehand what it should be, and it could change second<br>
&gt; by second.  Would something like this work?:<br>
<br>
</div>Are you using MySQL? If so, it is probably an auto_increment primary<br>
key. You don&#39;t need to specify it when inserting as it will<br>
automatically increment and set the primary key when you insert.<br>
<br>
<a href="http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html</a><br>
<font color="#888888"><br>
Eric<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Cialug mailing list<br>
<a href="mailto:Cialug@cialug.org">Cialug@cialug.org</a><br>
<a href="http://cialug.org/mailman/listinfo/cialug" target="_blank">http://cialug.org/mailman/listinfo/cialug</a><br>
</div></div></blockquote></div><br>