Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node js check if a user exists in mysql

connectDB.query("SELECT ACCOUNT_ID FROM registration WHERE ACCOUNT_ID = '"+ userAccnt +"'", function(err, result, field){
     if(result.length === 0){
        //new user logic
}else{  
    //existing user, redirect to another page 
 }
        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #node #js #check #user #exists #mysql
ADD COMMENT
Topic
Name
7+7 =