i appologise if my mistake is obvious, i have been staring at this line of SQL for a long time now and i just cant see the problem,
i have the following lines; (i split the lines so that i could see which one is causing the error, which is the same error if i put them all into a single line)
Code:SqlBuilder = mysql.NewSql() SqlBuilder.Append("UPDATE users SET play_duration=%i WHERE userID=%s;" % (user_dict['play_duration'], player)) SqlBuilder.Append("UPDATE users SET last_spawn=%i WHERE userID=%s;" % (user_dict['last_spawn'], player))SqlBuilder.Append("UPDATE users SET crew=('%s') WHERE userID=%s;" % (str(user_dict['crew']), player)) SqlBuilder.Append("UPDATE users SET crew_mod=%i WHERE userID=%s;" % (user_dict['crew_mod'], player)) SqlBuilder.Append("UPDATE users SET crew_leader=%i WHERE userID=%s;" % (user_dict['crew_leader'], player))# SqlBuilder.Append("UPDATE users SET mod=%i WHERE userID=%s;" % (user_dict['mod'], player))SqlBuilder.Append("UPDATE users SET admin=%i WHERE userID=%s;" % (user_dict['admin'], player)) SqlBuilder.Append("UPDATE users SET god=%i WHERE userID=%s;" % (user_dict['god'], player))SqlBuilder.Append("UPDATE users SET creation=%i WHERE userID=%s;" % (user_dict['creation'], player)) SqlBuilder.Append("UPDATE users SET alive=%i WHERE userID=%s;" % (user_dict['alive'], player))mysql.Update(SqlBuilder, self.database)
out of all of them, the only line that errors is the commented out one (mod), the column in the table is set up the same as admin/god etc etc - INT(1), and are formatted the same in the dict.
if anyone can spot the problem, i would very much appreciate a shout![]()
SQL - Update Syntax Issue
Discussion in 'Rust Development' started by inadequatemonkey, Aug 28, 2015.
