How to get a value from a database based on a value from the same row, but different column - pls help!!!!!!!!!!

I added the spaces and some console.log statements.

The error is coming from this line:
. catch (( error ) => {
//console.log()
console . log ( error );
});
The code isn’t going to the checkUserExists function