|
Posted by Oli Filth on 11/16/05 18:13
Bob Bedford wrote:
> I've a page where I can upload and delete images.
>
> I've such problem I'm trying to solve. My images are numbered xxxx-1.jpg,
> xxxx-2.jpg, xxxx-3.jpg (where xxxx is the article number).
>
> Now, when the used deletes the 2nd pictures, then I update the database for
> having the xxxx-3.jpg renamed in xxxx-2.jpg and also I rename the file on
> the server.
I think one point to make here (unrelated to the actual problem) is
that in general, one should not renumber the IDs of things in a
database when an item is removed.
Unless the ID number has some special significance other than to link
it to a row in the database, then I'd recommend not altering the
numbering, as it's one hell of a lot of housekeeping for no benefit...
(IMHO)
--
Oli
[Back to original message]
|