title: How to pass multiple GET parameters to Express?
body: <p>I'm a bit new to Node.js and writing some REST APIs in Node.js. For one of my API ,I need to pass 2 parameters to get the data from database.I have achieved it using single parameter but not more than 2. can anybody help me please ? </p>
  
  <p>Here's my code </p>
  
  <pre><code>app.get('/getData/:receiver_id&amp;:sender_id',function(req,res){
      connection.query('SELECT * FROM mytable WHERE sender_id=? AND receiver_id=?',[req.params.sender_id],[req.params.receiver_id],function(error,results,fields){
          if(error) throw error;
          else {
          res.json({'result':results})
          console.log(JSON.stringify(results))
          }
      });
  });
  </code></pre>
  
  <p>And I keep getting this error in the console</p>
  
  <pre><code>&gt; /var/www/html/chatApp/node_modules/mysql/lib/protocol/Parser.js:80
          throw err; // Rethrow non-MySQL errors
                ^
  TypeError: Object 1 has no method 'apply'
      at Query.Sequence.end (/var/www/html/chatApp/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
      at Query.ErrorPacket (/var/www/html/chatApp/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
      at Protocol._parsePacket (/var/www/html/chatApp/node_modules/mysql/lib/protocol/Protocol.js:278:23)
      at Parser.write (/var/www/html/chatApp/node_modules/mysql/lib/protocol/Parser.js:76:12)
      at Protocol.write (/var/www/html/chatApp/node_modules/mysql/lib/protocol/Protocol.js:38:16)
      at Socket.&lt;anonymous&gt; (/var/www/html/chatApp/node_modules/mysql/lib/Connection.js:91:28)
      at Socket.&lt;anonymous&gt; (/var/www/html/chatApp/node_modules/mysql/lib/Connection.js:502:10)
      at Socket.EventEmitter.emit (events.js:95:17)
      at Socket.&lt;anonymous&gt; (_stream_readable.js:710:14)
      at Socket.EventEmitter.emit (events.js:92:17)
  </code></pre>