【Rmarkdown rmysql】

http://*.com/questions/21167070/how-to-query-multiple-times-and-close-the-connection-at-the-end

使用query1=dbSendQuery(db, "select * from table1")

会出现

Error in mysqlExecStatement(conn, statement, ...) : RS-DBI driver: (connection with pending rows, close resultSet before continuin

的错误,解决方案是

query1=dbGetQuery(db, "select * from table1")

Because:

The function ‘dbGetQuery’ does all these in one operation (submits the statement, fetches all output records, and clears the result set).

上一篇:Linux内核高端内存


下一篇:牛客网第9场多校E(思维求期望)