Hi Steve
I can only speak of MySQL within a PHP environment but when creating a database table, ensure that the field is of an INT datatype, no nulls. Make sure also that you create a PRIMARY key for the field. You should also enable auto increment. Please see example below:
CREATE TABLE tbluploadedfiles (
fileid int(9) DEFAULT '0' NOT NULL auto_increment,
description varchar(255) DEFAULT '' NOT NULL,
filename varchar(255),
uploaddate date DEFAULT '0000-00-00' NOT NULL,
filesize mediumint(9) DEFAULT '0',
PRIMARY KEY (fileid),
KEY SK_description (description),
KEY SK_uploaddate (uploaddate)
);
The field above, 'fileid' will automatically increment by the value of 1 each time a new record is inserted. This will provide you with the unique ID to enable the user to click the hyperlink to download the file.
Hope this helps.
Good Luck.
BB