source: orange/Orange/doc/modules/sql-new1.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 360 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1# Description: Reads data from a database
2# Category:    file formats
3# Classes:     orngSQL.SQLReader
4# Referenced:  orngSQL.htm
5
6import orange, orngSQL
7
8r = orngSQL.SQLReader('mysql://user:somepass@localhost/test')
9r.execute("SELECT * FROM bus WHERE line='10';")
10data = r.data()
11for x in data:
12    print x
13
14print
15for a in data.domain.attributes:
16    print a
Note: See TracBrowser for help on using the repository browser.