My knowledge in PHP and MySQL is not so deep. I have a table with pick_number (varchar,4), field. I need 3 things:
1)Combine the 4 numbers and generate all possible combinations (will be 24 if all numbers are different) Numbers must have 4 numbers each, like: 1234, 2341,etc.... Reduces the number of combinations if one number is the same of another, like 1123. Here i thought to isolate the numbers:
$pick_number=GetRow("SELECT pick_number from table");
$n1=substr($pick_number, 0, 1);
$n2=substr($pick_number, 1, 1);
$n3=substr($pick_number, 2, 1);
$n4=substr($pick_number, 3, 1);
2)Count the combinations and store in another field;
3)Store the combinations in another field, so i can search if i need(i guess comma separeted should do the trick).
Thanks!