title: how to call one function in different in same file using nodejs
body: <p>this is my first function</p>
  
  <pre><code>exports.users=function(req,res){
      var sql="SELECT * FROM table";
      connection.query(sql,function(err,result){
          if(err){
              console.log(err)
          }
          else{
              //console.log()
              res.render('user',{data:result});
          }
      })
  
  }
  </code></pre>
  
  <p>this is my second function</p>
  
  <pre><code>exports.deleteuser=function(req,res){
      console.log(req.params)
      users();//gives error
  };
  </code></pre>
  
  <p>this is my app.js file</p>
  
  <pre><code>app.get('/adduser',company.users);
  app.get('/deleteuser/:email',function(req,res){
  
      var email=req.params.email;
      var sql="DELETE FROM appuser where email='"+ email +"'";
      connection.query(sql,function(err,res){
          if(err)
              console.log(err)
          else
              {
                  alert("deleted")
              }
      });
      res.render('adduser');
  })
  </code></pre>
  
  <p>what i want is to call users in deleteuser..
  Both are in same file..Im using ejs,nodejs</p>