Jump to content

Just a question thats all


Voodoo Jai

Recommended Posts

I have a db that has 2 fields

area code

telephone number

 

I also have a file that uses both these fields as a unique file name. So what I would like to know is? is it correct to concat both fields and add a suufix to it to give me the file name which can then used within PHP code.

 

area code "01224"

telephone number "456456"

suffix ".zip"

 

giving a filename "01224456456.zip"

 

I then call this file name in my page to be able to download it.

Link to comment
Share on other sites

the question is whether you can count on the phone company to give you a unique phone number?

if you wanted to trust to that i think it would be ok. Possibly better for  you would be to control the unique file names by adding or just using a unique key you generate for  yourself.

inserting into a database with an autoincrement pk field would give you the unique primary key you could use for that file, and by association you could also stick the filename into the database record.

also the date, and any related record info.

hth

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.