I could have swarn you said the column_id wasn't unique. Sorry.
Anyway, I don't really see the point in this function. If it produces .....
$rows['user1'] = array('user_id' => 1, 'user_name' => 'user1');
$rows['user2'] = array('user_id' => 1, 'user_name' => 'user2');
$rows['user3'] = array('user_id' => 1, 'user_name' => 'user2');
Then it is duplicating data. Why do you need the user names twice? You much better off simply returning a numerically indexed array....
$rows = array();
while($row = mysql_fetch_assoc($query)) {
$rows[] = $row;
}
And then again even more better off looping through the results in your calling code. This way you only need the one loop and not two.