X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmessage.cpp;h=f4d3a95381dbb72cfcb114e40a978e8a22913df8;hb=5f8a87e41beeda971d6a47a6c6b0555da00af978;hp=c15b5302b717ae11a89ed6824684e6188893a236;hpb=6b896a9e1dc143bba86795be1e9336549db9b85f;p=fms.git diff --git a/src/message.cpp b/src/message.cpp index c15b530..f4d3a95 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -179,10 +179,10 @@ const bool Message::Load(const std::string &messageuuid) const bool Message::LoadNext(const long messageid, const long boardid) { - std::string sql="SELECT MessageID FROM tblMessage WHERE MessageID>?"; + std::string sql="SELECT tblMessage.MessageID FROM tblMessage INNER JOIN tblMessageBoard ON tblMessage.MessageID=tblMessageBoard.MessageID WHERE tblMessage.MessageID>?"; if(boardid!=-1) { - sql+=" AND BoardID=?"; + sql+=" AND tblMessageBoard.BoardID=?"; } sql+=";"; @@ -209,12 +209,12 @@ const bool Message::LoadNext(const long messageid, const long boardid) const bool Message::LoadPrevious(const long messageid, const long boardid) { - std::string sql="SELECT MessageID FROM tblMessage WHERE MessageIDPrepare(sql);