blob: 97e0888583e5d98a2d631c2ede19779101a70215 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import mysql
fn main() {
mut conn := mysql.Connection{
host: 'localhost'
port: 3306
username: 'root'
password: ''
dbname: 'mysql'
}
conn.connect() ?
res := conn.query('show tables') ?
for row in res.rows() {
println(row.vals.join(', '))
}
conn.close()
}
|