mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
mysql: connection fixes (#18428)
This commit is contained in:
parent
7f178d4662
commit
f634f7b01f
6 changed files with 104 additions and 96 deletions
|
@ -1,14 +1,13 @@
|
|||
import db.mysql
|
||||
|
||||
fn main() {
|
||||
mut conn := mysql.Connection{
|
||||
mut conn := mysql.connect(
|
||||
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(', '))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue