1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb fixes

This commit is contained in:
Alexander Medvednikov
2019-08-03 01:35:36 +02:00
parent 9e380e2886
commit 34a98e3df0
2 changed files with 19 additions and 13 deletions

View File

@ -106,6 +106,12 @@ pub fn (db DB) exec_param2(query string, param, param2 string) []pg.Row {
param_vals[0] = param.str
param_vals[1] = param2.str
res := C.PQexecParams(db.conn, query.str, 2, 0, param_vals, 0, 0, 0)
e := string(C.PQerrorMessage(db.conn))
if e != '' {
println('pg exec2 error:')
println(e)
return res_to_rows(res)
}
return res_to_rows(res)
}