我需要一个查询来选择ID,因此进入的问题之前,我将介绍数据库设计从jom_community_users如何使用电子邮件验证
-
Table Name- jom_community_users id || name || username || email || password || usertype || block || sendEmail ------------------------------------------------------------------------------- 799 aaaa aaaa.bbbb [email protected] xxttxyyb Registered 1 0 ------------------------------------------------------------------------------- 800 xxxx xxxx.yyyy [email protected] aabbxtta Registered 1 0 Table Name- jom_community_invit from_id || to_email || point_given ----------------------------------- 799 [email protected] 1
选择id其中在该表中的电子邮件是相等在jom_community_invit表to_email给出的应该是一个在jom_community_invit表
- 点
您可以使用加入,请参阅该链接http://dev.mysql.com/doc/refman/5.0/en/join。 html http://mysqljoin.com/joins/inner-join-tutorial/ – pkachhia 2012-03-09 07:16:42