数据库操作
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

21 lines
417 B

package dbquery
import (
"testing"
)
func Test_StmtForExec(t *testing.T) {
Connect("127.0.0.1", "root", "123456", "tetele_empty", "3306")
stmt, err := StmtForUpdate("dev_tetele_net", "ttl_xshop_order", []string{"user_id = ?", "pay_time = pay_time+1"}, []string{"id=1"})
if err != nil {
t.Error(err)
}
defer stmt.Close()
ret, err := StmtForUpdateExec(stmt, []interface{}{"1"})
t.Log(ret)
t.Log(err)
}