Hi,
I want to generate a combination of numbers.
Example:Generating all cobination of arranging 5 numbers out of the given 30.
if i have 30 numbers and i pick 5 at a time i can arrange this in 142506 different ways. the numbers 5 and 30 should be dynamic .(If i change 5 or 30 it should be able to generate corresponding number of combinations.)
This is the first 20 combinations.
How can i generate this and dump it into a table in MySQL.
0 1_2_3_4_5_ 0
1 1_2_3_4_6
2 1_2_3_4_7_ 0
3 1_2_3_4_8
4 1_2_3_4_9_ 0
5 1_2_3_4_10
6 1_2_3_4_11_ 0
7 1_2_3_4_12
8 1_2_3_4_13_ 0
9 1_2_3_4_14
10 1_2_3_4_15_ 0
11 1_2_3_4_16
12 1_2_3_4_17_ 0
13 1_2_3_4_18
14 1_2_3_4_19_ 0
15 1_2_3_4_20
16 1_2_3_4_21_ 0
17 1_2_3_4_22
18 1_2_3_4_23_ 0
19 1_2_3_4_24
Thanks