How to get a row in a database based on a value in the row

Hi, I am trying to get a value in a row from a database based on a different value in the same row.

For example, I have this database called profile. The user enters their email which is already stored in the database. Using that email, I have to find the ID associated with that email, which is a field in the database. How would I do that using Velo?

Please show your project-setup!

  1. Which elements are used?
  2. How do look like your DATABASE and it’s structure?
  3. Are you using → DATASETS ?

Sorry if my past is vague. On a login page, there is an input box, where they enter their email. This is the code for that I have so far:
import wixUsers from ‘wix-users’ ;
import wixLocation from ‘wix-location’ ;
import wixData from ‘wix-data’ ;
let userId ;
let userEmail ;
let profileLink ;

$w . onReady ( function (){
$w ( ‘#loginNow’ ). onClick ( function (){
let email = $w ( ‘#loginEmail’ ). value ;
let password = $w ( ‘#loginPassword’ ). value ;
wixUsers . login ( email,password )
. then (()=>{




in the then statement, I want to have something where to will take that email and find it in the my database that I named teachers. In the teachers database there is a field name teachers(ID). Every member who is a teacher has a row in the database and has an email and teachers(ID). There is a dynamic page that is connected to the teachers(ID). I want to find the user’s, who logged in, ID in the database. I thought I could do it by getting their email that they inputted to sign in and then find that email in the database and then somehow use it to find the
ID that’s in the same row as the email.

Does this help?