# \[SOLVED\] Do a search for & "where"

**URL:** <https://forum.bubble.io/t/solved-do-a-search-for-where/1520>\
**Category:** Need help\
**Created:** [February 9, 2016, 1:40am UTC](https://forum.bubble.io/t/solved-do-a-search-for-where/1520 "2016-02-09T01:40:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RisforRowanism](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/risforrowanism/32/1105_2.png) [@RisforRowanism](https://forum.bubble.io/u/RisforRowanism)\
**Post date:** [February 9, 2016, 1:40am UTC](https://forum.bubble.io/t/solved-do-a-search-for-where/1520/1 "2016-02-09T01:40:54Z")

</div>

Hi there.

I have a question regarding the function Do A Search For.  
I want a user to log in with his username instead of his email. The name is already in the database.  
I thought about trying to catch the email address of the user whose name is used in the login form. Now I don’t see any “where” argument like in SQL. Do I have to nest searches?

What I want, short:  
Button Login is pressed  
Get nickname from input, make thing “nick”, get password from input  
Do a search for User’s nickname=“nick”  
Get that user’s email  
Login with that email and password

Thank you very much.

---

<div class="post-metadata">

**Author:** ![RisforRowanism](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/risforrowanism/32/1105_2.png) [@RisforRowanism](https://forum.bubble.io/u/RisforRowanism)\
**Post date:** [February 9, 2016, 2:10am UTC](https://forum.bubble.io/t/solved-do-a-search-for-where/1520/2 "2016-02-09T02:10:38Z")

</div>

Nevermind, it was really easy, I was thinking too complicated.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/9/9eeebd346b21d12146536358c5f8d96fa4446352.png)

I am creating a thing “email” which searches for a user that has the field username = input nickname’s value. That user is returned and I can simply attach the “…User’s email”.
