Paul Giesenhagen wrote:
> Yes, they are coming out of the database and the filename is their ID
number
> ...
> Can't hardcode, what if you are on 1003 and 1005(next) is deleted?
> ...
> They click on the thumbnail and it takes them to a page /reports/10032.cfm

Paul:

How is/was the file 10032.cfm created.  From the naming scheme, I'm assuming
it was automatically generated.  When generating it, you can simply tack in
the hardcoded previous/next links.

As to how to handle hardcoding when a file is deleted, simply regenerate the
files on either side of the file that is being deleted.  As an example,
let's say your file system looks something like:

        10030.cfm       (1)
        10031.cfm       (2)
        10032.cfm       (3)
        10033.cfm       (4)
        10034.cfm       (5)

and you now need to delete 10032.cfm (file (3)).  Your code would look
something like:
1) Query database/file system for the 2 files immediately preceding (3)
   and the 2 files immediately following (3).
2) Regenerate file (2) using (1) as the previous link and (4) as the next
link.
3) Regenerate file (4) using (2) as the previous link and (5) as the next
link.
4) Delete (3).

Again, this assumes that the files were auto-generated to begin with.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:138007
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to