Mercurial > hg > ltpda
view m-toolbox/classes/+utils/@mysql/getObjIds.m @ 44:409a22968d5e default
Add unit tests
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Tue, 06 Dec 2011 18:42:11 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% 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