Mercurial > hg > ltpda
diff m-toolbox/classes/+utils/@mysql/getMD5hash.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/+utils/@mysql/getMD5hash.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,25 @@ +% GETMD5HASH gets the md5 hash string of a given object ID. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% DESCRIPTION: GETMD5HASH gets the md5 hash string of a given object ID. +% +% CALL: h = getMD5hash(conn, id) +% +% VERSION: $Id: getMD5hash.m,v 1.2 2010/01/22 12:46:08 ingo Exp $ +% +% HISTORY: 24-05-2007 M Hewitson +% Creation +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +function h = getMD5hash(conn, id) + + error('### Obsolete as of LTPDA version 2.2. Replaced my the utils class jmysql (utils.jmysql.%s)', mfilename()); + q = sprintf('select hash from objs where id="%d"', id); + curs = exec(conn, q); + curs = fetch(curs); + h = curs.Data{1}; + close(curs); + +end +