I am trying to create table names based on the full path directory name. Unfortunately MySql has a maximum table name length limit of 64.
I have tried the following example:
$fullPath ==> /var/www/fred.com/public_html/this-is-far-too-long-and-does-not-allow-the-dbase-table-name-to-be-dynamically-produced/
118 ==> strlen($fullPath)
92 ==> gzdeflate($fullPath, 9) // 9 is mazimum compression :(
98 ==> gzcompress($fullPath, 9)
110 ==> gzencode($fullPath, 9)
// ADDED
13 ==> crypt($fullPath, "SALT") ==> SAgeUyK6492uo
32 ==> md5($fullPath) ==> de4deea89afea038f8a5619c4c3659dc
Before I create a cross-reference lookup table I am curious to know if there is an easier solution.
Edit:
Added crypt(…) and md5(…) which should solve the problem.