I was having a similar problem the other day. I found that my problem was that postgres was joining by columns in a way I hadn't anticipated, eventually I ended up doing a sub select in the select statement:

SELECT item_index,(SELECT location_index FROM locations WHERE locations.item_index=items.item_index ORDER BY location_index DESC LIMIT 1) FROM items

Kyle

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to