db fetch fetch query result
RESULTS
->execute($args = array(), $options = array())
return The called query object.
->fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL)
$mode Fetch mode.
return Result type specified by $mode.
->fetchObject($class_name = NULL, $constructor_args = array())
$class_name Class type to be returned.
Default: stdClass return Object of one record.
->fetchAssoc()
return Associative array of one record.
->fetchAllAssoc($key, $fetch = NULL)
$key Field name of the array key $fetch Fetch mode (PDO::FETCH_ASSOC, PDO::FETCH_NUM, or PDO::FETCH_BOTH).
return Associative array of data objects
->fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = array())
$mode Fetch mode. See above.
return Array of data objects.
Depending on fetch mode.
->fetchField($index = 0)
$index Numeric index of the column.
return A single field.
->fetchAllKeyed($key_index = 0, $value_index = 1)
$key_index Numeric index of the array key.
$value_index Numeric index of the array value.
return Associative array of all records.
//Add expression add dummy column
$query->addExpression(':val', 'updated', array(':val' => time()));