title: express.js / postgresql Get request returns []
body: <p>I have a table that stores id, user_name, state &amp; city. When I send a request to get * from my table, I get the expected results. When I send my request based on the city, I get a 200 response, but the return only shows []. The column I'm hitting is not an integer, so I feel like  const city = <strong>parseInt</strong>(request.params.city) is not correct, but I can't find anything online that calls out what should replace <strong>parseInt</strong>, if that's the issue. What am I missing?</p>
  <p>When calling http://localhost:8080/info I get the expected results:</p>
  <pre><code>{
      &quot;id&quot;: 1,
      &quot;user_name&quot;: &quot;Mike J&quot;,
      &quot;state&quot;: &quot;California&quot;,
      &quot;city&quot;: &quot;San Francisco&quot;
  },
  
  {
      &quot;id&quot;: 2,
      &quot;user_name&quot;: &quot;Emily R&quot;,
      &quot;state&quot;: &quot;Florida&quot;,
      &quot;city&quot;: &quot;Tampa&quot;
  },
  {
      &quot;id&quot;: 3,
      &quot;user_name&quot;: &quot;Tyrone S&quot;,
      &quot;state&quot;: &quot;New Mexico&quot;,
      &quot;city&quot;: &quot;Las Vegas&quot;
  },
  {
      &quot;id&quot;: 4,
      &quot;user_name&quot;: &quot;Eduardo G&quot;,
      &quot;state&quot;: &quot;Texas&quot;,
      &quot;city&quot;: &quot;Austin&quot;
  }
  </code></pre>
  <p>When adding the city to the call http://localhost:8080/info/Tampa I get:</p>
  <pre><code>[]
  </code></pre>
  <p>Here is my code:</p>
  <p><strong>index:</strong></p>
  <pre><code>const express = require('express')
  
  const bodyParser = require('body-parser')
  
  const app = express()
  
  const db = require('./queries')
  
  const port = 8080
  
  app.use(bodyParser.json());
  app.use(express.urlencoded({extended: true}));
  
  app.get('/', (_request, response) =&gt; {
    response.json({ info: 'Node.js, Express, and Postgres API' })
  })
  
  app.get('/info', db.getInfo)
  app.get('/info/:city', db.getInfoByCity)
  
  app.listen(port, () =&gt; {
    console.log(`App running on port ${port}.`)
  })
  </code></pre>
  <p><strong>queries:</strong></p>
  <pre><code>const Pool = require('pg').Pool
  
  const pool = new Pool({
    user: '//',
    host: '//',
    database: '//',
    password: '//',
    port: 5432,
  })
  
  const getInfo = (_request, response) =&gt; {
      pool.query('SELECT * FROM user_info ORDER BY id ASC', (error, results) =&gt; {
        if (error) {
          throw error
        }
        response.status(200).json(results.rows)
      })
    }
  
  const getInfoByCity = (request, response) =&gt; {
      const city = parseInt(request.params.city)
  
      pool.query('SELECT * FROM user_info WHERE city = $1', [city], (error, results) =&gt; {
        if (error) {
          throw error
        }
        response.status(200).json(results.rows)
       })
    }
  
    module.exports = {
      getInfo,
      getInfoByCity,
    }
  </code></pre>
  <p>Here is my user_info table (id, user_name, state, city)</p>
  <pre><code>1   &quot;Mike J&quot;    &quot;California&quot;    &quot;San Francisco&quot;
  
  2   &quot;Emily R&quot;   &quot;Florida&quot;   &quot;Tampa&quot;
  
  3   &quot;Tyrone S&quot;  &quot;New Mexico&quot;    &quot;Las Vegas&quot;
  
  4   &quot;Eduardo G&quot; &quot;Texas&quot; &quot;Austin&quot;
  </code></pre>