Correct. If it's an auto_increment "counter", 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"><<a href="mailto:eric@eric.nu">eric@eric.nu</a>></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>
> I'm wondering, if I need to do an INSERT INTO a table, and the table<br>
> has a counter for a primary key, how do I handle setting the counter?<br>
> I don't know beforehand what it should be, and it could change second<br>
> 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'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>