GhostXoP Posted December 18, 2012 Posted December 18, 2012 How would i add a new row using dbExec? Im in the direction of INSERT INTO -table- but would i then just put (value col 1) (value col 2) etc? dbExec(ServerDataBase, "INSERT INTO ClientData (username, password, data) VALUES ("..Username..","..Password..","..Data..")" ?
GhostXoP Posted December 18, 2012 Author Posted December 18, 2012 username TEXT, password TEXT etc? What if the table is already made?
Castillo Posted December 18, 2012 Posted December 18, 2012 There's an example on the wiki about inserting with SQlite: dbExec( connection, "INSERT INTO table_name VALUES (?,?,?)", "aaa", "bbb", 10 )
GhostXoP Posted December 18, 2012 Author Posted December 18, 2012 That shows for setting data, what about updating data?
Castillo Posted December 18, 2012 Posted December 18, 2012 There's also an example for updating data: dbExec( connection, "UPDATE ?? SET ??=?", tableName, columnName, columnValue )
GhostXoP Posted December 18, 2012 Author Posted December 18, 2012 Hows this dbExec(ServerDataBase, "UPDATE ClientData SET data ="..Data.." WHERE username=".."'"..Username.."'".." AND password=".."'"..password.."'")
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now