Hi,
echo $num = mysql_num_rows(mysql_query("SELECT DISTINCT bid_history.item_id FROM bid_history, item
WHERE item.auction_end > now() AND bid_history.user_id='$valid_user'"));
I am trying to wite a query to calculate how many item id's there are in the bid_history table for one user and where item has not ended in the item table.
If I set the timestamp in the item table to something in the past, I still get a result of 1(when it should be 0).
Do I need to use a JOIN?
I haven't really used multiple table queries before..
Any help much appreicated..
Asa