Options aren't loaded


I have a list of options wich is loaded via select2. It worked perfectly. Then I changed the query for security reasons to prepared statements. After that the options weren’t loaded anymore. Is there a known bug with prepared statements? What am I doing wrong?
This is the code:

$dbh = new PDO('mysql:host=;dbname=eventdb;charset=utf8', 'root', '');
$sql = "SELECT ed_020_bereich.ED_KBID, ed_020_bereich.BR_Bereich
    FROM ed_020_bereich
    WHERE ed_020_bereich.BR_active = 1 AND ed_020_bereich.ED_KID = :ED_KID
    ORDER BY ed_020_bereich.BR_Bereich";
$stmt = $dbh->prepare($sql);
$stmt->bindParam(':ED_KID', $kunde);
$return = array();
while($row = $stmt->fetch())


I found the solution.
I had to replace this:


with this:

'id' => $row['ED_KBID'],
'text' => $row['BR_Bereich']

So it’s no select2 bug.