public static function queryColumn(
        $db,
        $table,
        $field,
        $id_field = null,
        $id = 0
    ) {
        $field = new SwatDBField($field, 'integer');

        if ($id_field == null) {
            $sql = 'select %s from %s';
            $sql = sprintf($sql, $field->name, $table);
        } else {
            $id_field = new SwatDBField($id_field, 'integer');
            $sql = 'select %s from %s where %s = %s';
            $sql = sprintf(
                $sql,
                $field->name,
                $table,
                $id_field->name,
                $db->quote($id, $id_field->type)
            );
        }

        $values = self::executeQuery($db, 'queryCol', array(
            $sql,
            $field->type
        ));

        return $values;
    }