db_select throws PDOException
You haven't selected any fields:

$result = db_select('raffles', 'r')
  -&gt;fields('r', array('foo', 'bar'))
  -&gt;execute()
  -&gt;fetchAll();


If you want to select all the fields, then use the following code.

$result = db_select('raffles', 'r')
  -&gt;fields('r')
  -&gt;execute()
  -&gt;fetchAll();


Incidentally, the second raffles is a valid alias and not related to the problem.