mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
17 lines
256 B
V
17 lines
256 B
V
import db.mysql
|
|
|
|
fn main() {
|
|
mut conn := mysql.connect(
|
|
host: 'localhost'
|
|
port: 3306
|
|
username: 'root'
|
|
password: ''
|
|
dbname: 'mysql'
|
|
)!
|
|
res := conn.query('show tables')!
|
|
for row in res.rows() {
|
|
println(row.vals.join(', '))
|
|
}
|
|
conn.close()
|
|
}
|