annotate m-toolbox/classes/tests/database/@ltpda_database/getTableEntry.m @ 41:6def6533cb16 database-connection-manager

Report authentication errors to user
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 18:04:34 +0100
parents 79dc7091dbbc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
1 %
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
2 % DESCRIPTION: Returns a table enty for the given inputs: database table,
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
3 % column name, object ID
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
4 %
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
5 % VERSION: $Id: getTableEntry.m,v 1.2 2011/05/25 16:20:37 ingo Exp $
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
6 %
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
7 function val = getTableEntry(utp, dbTable, tableField, objID)
25
79dc7091dbbc Update tests
Daniele Nicolodi <nicolodi@science.unitn.it>
parents: 0
diff changeset
8
79dc7091dbbc Update tests
Daniele Nicolodi <nicolodi@science.unitn.it>
parents: 0
diff changeset
9 q = sprintf('SELECT %s.%s FROM %s WHERE %s.obj_id = ?', dbTable, tableField, dbTable, dbTable);
79dc7091dbbc Update tests
Daniele Nicolodi <nicolodi@science.unitn.it>
parents: 0
diff changeset
10 val = utils.mysql.execute(utp.conn, q, objID);
79dc7091dbbc Update tests
Daniele Nicolodi <nicolodi@science.unitn.it>
parents: 0
diff changeset
11
0
f0afece42f48 Import.
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff changeset
12 end