cannot read URL variable in SQL query
<p>I have a simple problem with my node js application.
Is that : I can't read or use an URL variable in a request query , I think it said that that the ' req.params ' cannot be applicated to a unknown variable.</p>

<p><strong>The error is :</strong> </p>

<blockquote>
  <p>Cannot read property 'params' of undefined</p>
</blockquote>

<p><strong>This is my server side :</strong> </p>

<pre><code>app.get('/Home/:pwd', function (req,res){
    var sess;
    sess  = req.session;
    //var PWD = req.params("pwd");
    var DAO = require('./lib/DAO')

    DAO.executeQuery('SELECT * FROM restaurants WHERE name = '.req.params("pwd"), function(Value) {
        res.render ( 'Home', {data : Value} )
    });

    res.setHeader("Content-Type", "application/json"); //pour un affichage json

});
</code></pre>

<p><strong>And this is my ejs file :</strong></p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body&gt;

{
"name": &lt;%=data[0].id%&gt;,
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app"
}

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Thank guys for your helps</p>