MySQL Query Guidance Needed

Nicholas Leippe nick at leippe.com
Mon Sep 25 15:57:50 MDT 2006


On Monday 25 September 2006 15:48, Nicholas Leippe wrote:
> SELECT
...
> (SELECT # item total
>  SUM(ships.basePrice * IF(ships.techLevel > 1,
>      10, 1)) AS ships_total
>  FROM       mails
>  LEFT  JOIN lost           ON (lost.mail_id = mails.id)
>  LEFT  JOIN items AS ships ON (lost.item_id = ships.id)
>  WHERE mails.player_id = 6
> )

should be:

SELECT
...
(SELECT # ship total
 SUM(ships.basePrice * IF(ships.techLevel > 1,
     10, 1)) AS ships_total
 FROM      mails 
 LEFT JOIN items AS ships ON (ships.id = mails.ship_id)
 WHERE mails.player_id = 6
)





More information about the PLUG mailing list