Hi,

I asked for some help about a week ago and thanks to everybody who got me a little closer to the solution.

I am developing an online fantasy rugby game. Visitors buy and sell players and earn points depending on those players' performances in real matches.

The only problem I have is that when visitors go to the 'Purchase Players' screen, I cannot exclude players that they already own. For example, if they already have Jonny Wilkinson in their team, Wilkinson is still available to purchase again (anybody familiar with rugby will appreciate the issue with a visitor fielding a team of 15 Jonny Wilkinsons).

I am using two queries. The first query selects the players that are available to buy:

$teamqry = "SELECT * FROM players, countries WHERE players.position = '$pos' AND players.country = countries.countryid AND players.price <= '$availablebudget' ORDER BY players.price DESC";

The second brings up the squad that a visitor has currently selected:

$squadqry = "SELECT * FROM transactions, players, positions, countries WHERE transactions.managerid = '$userid' AND transactions.playerid = players.playerid AND players.position = positions.positionid AND players.country = countries.countryid AND datein < '$now' AND dateout > '$now' ORDER BY positionid ASC";

Basically I need to be able to produce a list of all the players that appear in the first query ($teamqry) EXCEPT those that appear in the second ($squadqry).

Help!?!?!??!

Thanks very much,
Matt



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to