comparison m-toolbox/classes/+utils/@mysql/getObjIds.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % GETOBJIDS gets a list of object ids from a given collection id.
2 %
3 % Usage: ids = getObjIds(conn,cid);
4 %
5 % Inputs:
6 % conn - a database connection object
7 % cid - a collection id
8 %
9 % Outputs:
10 % ids - a list of object ids
11 %
12 % M Hewitson 30-08-07
13 %
14 % $Id: getObjIds.m,v 1.2 2010/01/22 12:46:08 ingo Exp $
15 %
16
17 function ids = getObjIds(conn, cid)
18
19 error('### Obsolete as of LTPDA version 2.2. Replaced my the utils class jmysql (utils.jmysql.%s)', mfilename());
20 try
21 curs = exec(conn, sprintf('select obj_ids from collections where id="%d"', cid));
22 curs = fetch(curs);
23 ids = str2num(curs.Data{1});
24 close(curs);
25 catch
26 error('### Unable to determine object IDs from collection ID. Server returned %s', curs.Message);
27 end
28
29 end
30