View Single Post
  #4  
Old 07-15-2016, 05:38 AM
Darkscis
Sarnak
 
Join Date: Mar 2015
Posts: 62
Default

Didn't work. After turning on logging I can see that it is adding the charid and taskid to the beginning of the string.

i.e. it is trying to run;
(659774,306)character_enabledtasks (charid,taskid) VALUES

instead of REPLACE INTO character_enabledtasks ...

Same thing for quest::disabletask.

EDIT: Fixed by changing both entries to this (2nd Edit: Also I had to remove your brackets for the order of precedence around the disabletask conditional as it caused issues);

std::stringstream queryStream;
queryStream << "REPLACE INTO character_enabledtasks (charid, taskid) VALUES ";

std::stringstream queryStream;
queryStream << StringFormat("DELETE FROM character_enabledtasks WHERE charid = %i AND (", charID);

Thanks again for your help!!
Reply With Quote