An observation about the _use_ of array_product with primes:
$a=$arrayOfSomePrimes=(2,3,11);
// 2 being the first prime (these days)
$codeNum=array_product($a); // gives 66 (== 2*3*11)
echo "unique product(\$a) = " . array_product($a) . "\n";
The 66 can (only) be split into its original primes,
which can be transformed into their place in the row of primes (2,3,5,7,11,13,17,19...) giving (1,2,3,4,5,6,7,8...)
The 66 gives the places {1,2,5} in the row of primes. The number "66" is unique as a code for {1,2,5}
So you can define the combination of table-columns {1,2,5} in "66". The bigger the combination, the more efficient in memory/transmission, the less in calculation.