annotate m-toolbox/classes/tests/database/@ltpda_database/getTableEntry.m @ 52:daf4eab1a51e
database-connection-manager tip
Fix. Default password should be [] not an empty string
author |
Daniele Nicolodi <nicolodi@science.unitn.it> |
date |
Wed, 07 Dec 2011 17:29:47 +0100 |
parents |
79dc7091dbbc |
children |
|
rev |
line source |
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 % DESCRIPTION: Returns a table enty for the given inputs: database table,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % column name, object ID
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 %
|
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 $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 function val = getTableEntry(utp, dbTable, tableField, objID)
|
25
|
8
|
|
9 q = sprintf('SELECT %s.%s FROM %s WHERE %s.obj_id = ?', dbTable, tableField, dbTable, dbTable);
|
|
10 val = utils.mysql.execute(utp.conn, q, objID);
|
|
11
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 end
|