> hello > > i have a message table like this: > > created datetime > sender int > recipient int > message text > > to get all my messages i would do: > > select * from message where sender = $MYID or recipient = $MYID > > but how do i make a query that returns the rows of only the NEWEST > messages between myself and my contacts (regardless of who sent the > newest message)?
Define "newest". > i tried using "group-wise maximum" mentioned in the mysql manual, but > can't figure it out. hope someone can help. thanks! Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]