source: orange/orange/doc/modules/sql2.py @ 2429:2bd4005e5b2e

Revision 2429:2bd4005e5b2e, 393 bytes checked in by blaz <blaz.zupan@…>, 8 years ago (diff)

files providing documentation for orngMySQL module

Line 
1# Description: Reads a data base from MySQL
2# Category:    file formats
3# Classes:     orngMySQL.Connect
4# Referenced:  orngMySQL.htm
5
6import orange
7import orngMySQL
8
9t = orngMySQL.Connect('localhost','root','','test')
10
11data = t.query("SELECT * FROM busclass WHERE line='10'")
12for x in data:
13    print x
14
15print
16for a in data.domain.attributes:
17    print a
18print 'Class:', data.domain.classVar
Note: See TracBrowser for help on using the repository browser.