GhostXoP Posted December 18, 2012 Share 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..")" ? Link to comment
Renkon Posted December 18, 2012 Share Posted December 18, 2012 For strings you gotta use: 'text' Link to comment
GhostXoP Posted December 18, 2012 Author Share Posted December 18, 2012 username TEXT, password TEXT etc? What if the table is already made? Link to comment
Castillo Posted December 18, 2012 Share 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 ) Link to comment
GhostXoP Posted December 18, 2012 Author Share Posted December 18, 2012 That shows for setting data, what about updating data? Link to comment
Castillo Posted December 18, 2012 Share Posted December 18, 2012 There's also an example for updating data: dbExec( connection, "UPDATE ?? SET ??=?", tableName, columnName, columnValue ) Link to comment
GhostXoP Posted December 18, 2012 Author Share Posted December 18, 2012 Hows this dbExec(ServerDataBase, "UPDATE ClientData SET data ="..Data.." WHERE username=".."'"..Username.."'".." AND password=".."'"..password.."'") Link to comment
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