Is it possible to have multiple joins.. Ont eh query below. it failes.. Buuuut, if I limit it to one join, it works great.. My database logs transactions and I'm trying to produce a report that shows each transaction total, within a certain period.. (Oct and sept so far..)
but it's cfalling over.. Anyhoo, off to google... race you! ============ SELECT SUM(activitiesSep.points) as sepPoints ,SUM(activitiesOct.points) as octPoints ,users.ID ,users.Username ,users.Password ,users.Name ,users.Company ,users.Address1 ,users.Address2 ,users.Address3 ,users.Address4 ,users.Address5 ,users.Postcode ,users.Email ,users.CustomerType ,users.Active ,users.LogIns ,users.GAURef ,users.JRRef ,users.GAUMember ,users.GAUContact ,users.RegForm ,users.Created ,users.Updated FROM `users` RIGHT JOIN `activities` as `activitiesSep` on activitiesSep.UserID = users.ID WHERE activitiesSep.`Timestamp` >= '1188604800' AND activitiesSep.`Timestamp` <= '1191196799' RIGHT JOIN `activities` as `activitiesOct` on activitiesOct.UserID = users.ID WHERE activitiesOct.`Timestamp` >= '1191196800' AND activitiesOct.`Timestamp` <= '1193875199' GROUP BY users.ID ================ -- Give a man a fish and he'll feed himself for a day. Give a man a religion and he'll starve to death praying for a fish. Anon `We are what we pretend to be, so we must be careful what we pretend to be.` Kurt Vonnegut `When a person can no longer laugh at himself, it is time for others to laugh at him.` Thomas Szasz ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: wdvltalk@lists.wdvl.com To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.