% GETOBJIDS gets a list of object ids from a given collection id.
%
% Usage: ids = getObjIds(conn,cid);
%
% Inputs:
%     conn - a database connection object
%     cid  - a collection id
%
% Outputs:
%     ids  - a list of object ids
%
% M Hewitson 30-08-07
%
% $Id: getObjIds.m,v 1.2 2010/01/22 12:46:08 ingo Exp $
%

function ids = getObjIds(conn, cid)

  error('### Obsolete as of LTPDA version 2.2. Replaced my the utils class jmysql (utils.jmysql.%s)', mfilename());
  try
    curs    = exec(conn, sprintf('select obj_ids from collections where id="%d"', cid));
    curs    = fetch(curs);
    ids     = str2num(curs.Data{1});
    close(curs);
  catch
    error('### Unable to determine object IDs from collection ID. Server returned %s', curs.Message);
  end

end

