Mysql join query problem
22:47 22 Jun 2011

My tables

product

pid name

1    AA
2    bb
3    cc

History table

hid pid uid 
1    1   1
2    1   2
3    1   1  // this one should join with pid 1
4    3   2  // this one should join with pid 3
5    2   3
6    2   1 // this one should join with pid 2

I like to display most recent bidder on a product.The history tables stores bidder details.if no bid on product just need to return null.

Thanks

mysql join