syber - 4:06 pm on Aug 10, 2010 (gmt 0)
The subquery brings in the matching columns from the payments table (if they exist) without having to do a JOIN.
By using the JOIN criteria in the WHERE clause of the subquery, you are able to display matching data from other tables.
MySQL reference for correlated subqueries: [dev.mysql.com ]
Try the sample code I displayed above.