table players

player1

player2

player3

player4

player5

...

player100

etc

I need to select 10 unique random teams with 4 players as: 1 base and 3 pivots

Currently trying to use:

```
    require_once "connect_to_mysql.php"; 
    $sqlCommand = "SELECT id FROM players ORDER BY RAND() LIMIT 10"; 
    $query = mysql_query($sqlCommand) or die (mysql_error()); 
    $i =1;
    while ($row = mysql_fetch_array($query)) { 
        echo "$i Base  = ";
        echo $row['id'];
        echo "<br />";  
        echo 'Pivot';   
        echo "<br />";
        if ($i % 4 == 0)
     {
       echo '<br />';
     }
     $i++;
    } 
    mysql_close();

```

Result must be:

```
**team 1**
Base 1
Pivot 1
Pivot 2
Pivot 3

**team 2**
Base 1
Pivot 1
Pivot 2
Pivot 3

**team 3**
Base 1
Pivot 1
Pivot 2
Pivot 3

**team 4**
Base 1
Pivot 1
Pivot 2
Pivot 3

**team 5**
Base 1
Pivot 1
Pivot 2
Pivot 3

**team 6**
Base 1
Pivot 1
Pivot 2
Pivot 3

```