I have a query like this:
$product_classes = db_select('node_type', 't')->fields('t', array('name', 'type'))->condition('module','uc_product')
->execute()->fetchAllAssoc('orig_type', PDO::FETCH_ASSOC);
It will return an array with only first valid table row, however there are more valid rows.
If I use this query, without specified fields:
$product_classes = db_select('node_type', 't')->fields('t')-:condition('module','uc_product')
->execute()->fetchAllAssoc('orig_type', PDO::FETCH_ASSOC);
It will return array with all the valid rows. It is a drupal bug?