sqlBuilder help

edited January 2007 in Vanilla 1.0 Help
This is giving me an error: $s->Clear(); $s->SetMainTable('LUM_DiscussionUserWhisperFrom', 'wf'); $s->AddFieldNameValue('DiscussionID', $NewDiscussionID); $s->AddWhere('wf', 'DiscussionID', '', $currentDiscussionID, '='); $s->AddWhere('wf', 'WhisperFromUserID', '', $AuthorUserID, '='); $this->Context->Database->Update($s, $this->Name, 'UpdateWhisper', 'An error occurred while whisper from discussion properties.'); what's wrong? the error I got: Affected Elements ModerationManager.UpdateWhisper(); The error occurred on or near: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '='764' where = '749' and = '1' )' at line 1

Comments

  • ok figured out I was to tired yesterday to see it... I had to take out the table prefix! lol so stupid I was! so instead of: $s->SetMainTable('LUM_DiscussionUserWhisperFrom', 'wf'); should be this: $s->SetMainTable('DiscussionUserWhisperFrom', 'wf'); hope it helps someone who stumble in the same blund...
This discussion has been closed.