I need a query, so before entering into question I will introduce the database design
Table Name- jom_community_users
id || name || username || email || password || usertype || block || sendEmail
-------------------------------------------------------------------------------
799 aaaa aaaa.bbbb a@a.com xxttxyyb Registered 1 0
-------------------------------------------------------------------------------
800 xxxx xxxx.yyyy x@x.com aabbxtta Registered 1 0
Table Name- jom_community_invit
from_id || to_email || point_given
-----------------------------------
799 x@x.com 1
select id from jom_community_users
- where email in this table is equal to to_email in jom_community_invit table
- points given should be one in jom_community_invit table
Not sure if this is what you are after but:
As mentioned, I hope this is what you are asking for.