comparison m-toolbox/classes/@repogui2/getTables.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 % GETTABLES get a list of database tables
2 %
3 % M Hewitson
4 %
5 % $Id: getTables.m,v 1.2 2011/04/08 08:56:36 hewitson Exp $
6 %
7 function tables = getTables(mainfig)
8
9 % Get conn
10 conn = mainfig.connection;
11
12 if ~isempty(conn)
13 % get the databases
14 q = 'show tables';
15 curs = exec(conn, q);
16 curs = fetch(curs);
17
18 tables = curs.Data;
19 close(curs);
20 else
21 tables = {'-'};
22 end
23
24 end