|
Posted by _Raven on 09/20/06 16:30
I want to search the database for users who have email addresses whose email
username matches their stored username.
So assuming my table is like so:
TABLE `users`
id | username | email
1 | jim | user@domain.com
2 | bob | bob@domain.com
3 | jen | jen13@domain.com
So I want to search like "SELECT * from `users` where
email=username@userdomain.com", which in the case above would return row #2
only, as user bob has email bob@domain.com, and not row 1 as email username
is nowhere near the username, and not row 3 as this username does not match
100%.
I know I will need to use regex and all that, I'm just not sure about how to
correctly set up the query itself to get the correct records.
Thanks for any help you can give!
Raven
Navigation:
[Reply to this message]
|