MYSQL_GETOBJTYPE gets the object type associated with the given object id. Usage: ids = mysql_getObjType(conn,id); Inputs: conn - a database connection object id - an object id Outputs: type - the type of this object M Hewitson 30-08-07 $Id:$
0001 function type = mysql_getObjType(conn, id) 0002 0003 % MYSQL_GETOBJTYPE gets the object type associated with the given object id. 0004 % 0005 % Usage: ids = mysql_getObjType(conn,id); 0006 % 0007 % Inputs: 0008 % conn - a database connection object 0009 % id - an object id 0010 % 0011 % Outputs: 0012 % type - the type of this object 0013 % 0014 % M Hewitson 30-08-07 0015 % 0016 % $Id:$ 0017 % 0018 0019 0020 curs = exec(conn, sprintf('select objtype from objmeta where objid="%d"', id)); 0021 curs = fetch(curs); 0022 type = curs.Data{1}; 0023 close(curs); 0024 0025