Victoria Reznichenko writes: > > SELECT COUNT(*) FROM question, listing, user ub, user us WHERE > question.listing_id = listing.id AND question.buyer_id = ub.id AND > listing.seller_id = us.id AND (ub.id = 2346 OR us.id = 2346) > ORDER BY question.last_modified DESC; > > +----------+ > | COUNT(*) | > +----------+ > | 4 | > +----------+ > > SELECT question.id AS question_id, listing.id AS listing_id, > ub.id AS buyer_id, ub.username AS buyer_name, us.id AS seller_id, > us.username as seller_name FROM question, listing, user ub, user us > WHERE question.listing_id = listing.id AND question.buyer_id = ub.id AND > listing.seller_id = us.id AND (ub.id = 2346 OR us.id = 2346) ORDER BY > question.last_modified DESC; > > +-------------+------------+----------+------------+-----------+-------------+ > | question_id | listing_id | buyer_id | buyer_name | seller_id | seller_name | > +-------------+------------+----------+------------+-----------+-------------+ > | 6850 | 12909 | 2346 | user2346 | 4879 | user4879 | > | 4823 | 39039 | 2346 | user2346 | 14831 | user14831 | > +-------------+------------+----------+------------+-----------+-------------+ > 2 rows in set (0.00 sec) > >
Hi! Thank you for your test case and for the uploaded file. I have tested it with latest 4.0.5 build and I get correct results. Here they are: COUNT(*) 4 question_id listing_id buyer_id buyer_name seller_id seller_name 6850 12909 2346 user2346 4879 user4879 4823 39039 2346 user2346 14831 user14831 6084 49920 2346 user2346 14704 user14704 6223 48014 2346 user2346 7386 user7386 You can either wait for 4.0.5 or try to build from our current BK 4.0 repository. -- Regards, __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php