The idea was that the user uploads a file and I insert details about theEven with this scenario you probably can do with out the extra column as John has suggested.
file into the mysql table and rename the file using the generated id.
so if the next primary key is 4 I generate the file id CR-004 and rename theYou are still following a pattern. COuld you perhaps clarify if CR is common for all users or do you choose a different prefix for different users. If you do use different combinations of letters yes you might need a different field and then the solution would be what Robert suggested mysql_insert_id() you will need to use an update an update query where the condition has the insert id returned by this call.
uploaded file to CR-004 whilst also storing CR-004 in the table.
Thanks for your ideas so far - very useful! How do you get to know about allby RTFM. :-)
these useful functions?
Cheers
Matt -----
--
Raditha Dissanayake.
---------------------------------------------
http://www.radinks.com/print/upload.php
SFTP, FTP and HTTP File Upload solutions
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php