RE: Inserting data without a reference in the row.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I'm trying to add a new column in my moviedatabase because I want to
have
> a
> movienumber that doesn't have "holes" between the movies when I delete
a
> movie. So I have to update the new column with increasing numbers. Is
it
> possible to refer to row with a mysqlnumer of any kind?

If the "holes" in the auto_increment column create problems for you,
then you are not using the column for its intended purpose. It is there
to provide a unique identifier for each row, and nothing else. It is not
there to tell you how many rows you have or anything else.

You're going to end up implementing some horrible hack to add/delete
columns and reset numbers instead of designing your program the right
way. Maybe if you stated why the "holes" cause you trouble, someone
could help you re-write your program so they do not matter. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux