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
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
[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 `
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
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