Mailinglisten-Archive |
Moin Jörg, > -----Original Message----- > "SELECT Messages.ID,[User].Name, Messages.SentAt, Messages.Message FROM > [User] INNER JOIN Messages ON Messages.UserID = [User].ID WHERE > ChatroomID > = " & ChatroomID & " AND SentAt >= (SELECT LastMessage FROM User2ChatRoom > WHERE UserID = " &BenutzernameID & " AND ChatroomID = " & ChatroomID & ") > ORDER By SentAt" > Vorbedingung, es gibt nur einen Eintrag pro UserID+ChatroomID in User2ChatRoom. ist Chatroomid in user oder messages? Ohne Gewähr: "SELECT Messages.ID,User.Name, Messages.SentAt, Messages.Message FROM User INNER JOIN Messages ON Messages.UserID = User.ID, User2ChatRoom WHERE Messages.ChatroomID = " & ChatroomID & " AND SentAt >= User2ChatRoom.LastMessage And User2ChatRoom.UserID = " &BenutzernameID & " AND User2ChatRoom.ChatroomID = " & ChatroomID & " ORDER By SentAt" Gruss, Michael Donning --- Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter -->> http://www.4t2.com/mysql
php::bar PHP Wiki - Listenarchive