Open huzhenjie opened 4 years ago
https://github.com/chenshenhai/koa2-note/blob/c667c4fa4b9cf31acd2b76e29a5056b69581ca65/demo/project/server/utils/db-util.js#L41
The Demo code here has something wrong.
let findDataById = function( table, id ) { let _sql = "SELECT * FROM ?? WHERE id = ? " return query( _sql, [ table, id, start, end ] ) }
Solution
let findDataById = function( table, id ) { let _sql = "SELECT * FROM ?? WHERE id = ? " return query( _sql, [ table, id] ) }
https://github.com/chenshenhai/koa2-note/blob/c667c4fa4b9cf31acd2b76e29a5056b69581ca65/demo/project/server/utils/db-util.js#L41
The Demo code here has something wrong.
Solution