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
https://forums.phpfreaks.com/topic/96165-just-a-question-thats-all/
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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.