[PHP-DB] Re: Auto Increment

2002-10-07 Thread Owen Prime
BTW... you only need to do it once. Subsequent INSERTS will follow on from the previous insert. Owen Prime wrote: > Gavin, > > You can specify the next auto_increment id by using > > SET INSERT_ID = #; > > Where # is your desired number. Will only work for the next INSERT/ALTER. > Have a loo

[PHP-DB] Re: Auto Increment

2002-10-07 Thread Owen Prime
Gavin, You can specify the next auto_increment id by using SET INSERT_ID = #; Where # is your desired number. Will only work for the next INSERT/ALTER. Have a look down the bottom of 7.33 in the MySQL language reference. Cheers, Owen Gavin Nouwens wrote: > Hi peoples, > > Just wondering i

[PHP-DB] Re: Auto Increment Problems....

2002-07-30 Thread Joel Boonstra
[straying OT, but...] > Instead of incrementing to find the next row to count them, you dont have to > set the ID if it is auto increment. MySQL will do it for you (and i think it > might fill the holes too). Also, to get the num. of rows just do this - > > $get_rows = mysql_query("SELECT * FROM `

[PHP-DB] Re: Auto Increment Problems....

2002-07-30 Thread Tony Harrison
Instead of incrementing to find the next row to count them, you dont have to set the ID if it is auto increment. MySQL will do it for you (and i think it might fill the holes too). Also, to get the num. of rows just do this - $get_rows = mysql_query("SELECT * FROM `table`"); $num_rows = mysql_num

[PHP-DB] Re: Auto Increment Problems....

2002-07-29 Thread Adam Royle
Firstly, don't cross post unless the question *really* has to do with both (in this case, it should be just db). Secondly, your id field should only be used as a reference to a row (not showing order of record). Auto increments are exactly that, the rdbms will take care of creating the increme