PDA

View Full Version : Whats wrong with this Query?


dynamo
08-16-2007, 07:02 PM
SELECT MIN(total),MAX(total)
FROM p_listings, t_table
WHERE (p_listings.prod_id=t_table.prod_id)

This Query seems to only return the first record in the table. Anyone know why?

m1a2x3x7
08-16-2007, 08:40 PM
I tested it and it pulled 2 for me. but i used only 1 table. im guessing your max for each table are 2 different maxes say max for 1 table is 15 and the max for the other is 17 it wont match up.