Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
What i want to do, is to associate a number to an html page's absolute path for to be able to use that number for my database relations instead of the BIG absolute path string.
so to get an integer out of a string i would just have to type: htmlpage = a string respresenting the absolute path of the requested .html file But would that be unique? Here is some background information: This counter script will work on a shared hosting enviroment, so absolutes paths are BIG and expected like this: /home/nikos/public_html/varsa.gr/articles/html/files/index.html In addition to that my counter.py script maintains details in a database table that stores information for each and every webpage requested. My 'visitors' database has 2 tables: 'pin' has to be a number because if i used the column 'page' instead, just imagine the database's capacity withholding detailed information for each and every .html requested by visitors!!! So i really - really need to associate a (4-digit integer <=> htmlpage's absolute path) Maybe it can be done by creating a MySQL association between the two columns, but i dont know how such a thing can be done(if it can). So, that why i need to get a "unique" number out of a string. please help. In reply to Using filepath method to identify an .html page by Nik
|
|