Adding a temporary column to a db_select query
You just need to use an expression, e.g.

$query = db_select('people', 'p')
  -&gt;fields('p', array('id', 'date'));

$query-&gt;addExpression(':val', 'type', array(':val' =&gt; 'thing'));


Gives:

SELECT p.id AS id, p.date AS date, :val AS type
FROM 
{people} p


The replacement for :val will be injected when you execute the query.