title: Error bind message supplies 1 parameters, but prepared statement "" requires 0. How can I fix this error?
body: <p>I am working with javascript and getting my data from a sql file
  I would like to make my formatting and syntax is correct and make sure I am not missing any key arguments so it can work when I run through Postman.</p>
  <p>I need for the following format to be returned when campground name is returned:</p>
  <pre><code> &quot;campgrounds&quot;: [{
          &quot;campground&quot;: &quot;Three Rivers Petroglyph Site&quot;,
          &quot;location&quot;: &quot;Lincoln, NM&quot;,
          &quot;maxlength&quot;: &quot;25&quot;
    }]
  </code></pre>
  <p>This is what I have written:</p>
  <pre class="lang-js prettyprint-override"><code>
  app.get('/search', async (req, res) =&gt; {
      let searchTerm = req.query.name;
      console.log(`Search for ${searchTerm}`);
  
      try { const template = &quot;SELECT name, location, maxlength FROM campgrounds&quot;;
            const response = await pool.query(template, [searchTerm]);
                  if (searchTerm === template.name) {
                          res.json({campgrounds: searchTerm, location: req.query.location, maxlength: req.query.maxLength});
                  }
  
      } catch (err){
          console.log(err);
      }
  })
  </code></pre>
  <p>This is the error that is thrown:</p>
  <pre><code>error: bind message supplies 1 parameters, but prepared statement &quot;&quot; requires 0
      at Parser.parseErrorMessage (/root/DatabaseApp350/db-class/practice/task4/node_modules/pg-protocol/dist/parser.js:278:15)
      at Parser.handlePacket (/root/DatabaseApp350/db-class/practice/task4/node_modules/pg-protocol/dist/parser.js:126:29)
      at Parser.parse (/root/DatabaseApp350/db-class/practice/task4/node_modules/pg-protocol/dist/parser.js:39:38)
      at Socket.&lt;anonymous&gt; (/root/DatabaseApp350/db-class/practice/task4/node_modules/pg-protocol/dist/index.js:8:42)
      at Socket.emit (events.js:315:20)
      at addChunk (_stream_readable.js:295:12)
      at readableAddChunk (_stream_readable.js:271:9)
      at Socket.Readable.push (_stream_readable.js:212:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:186:23) {
    length: 137,
    severity: 'ERROR',
    code: '08P01',
    detail: undefined,
    hint: undefined,
    position: undefined,
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'postgres.c',
    line: '1665',
    routine: 'exec_bind_message'
  }
  </code></pre>
  <p>I am not sure how to fix this error! (update error was fixed)</p>
  <pre class="lang-js prettyprint-override"><code>const response = await pool.query(template, [searchTerm]);
  </code></pre>
  <p>was changed to:</p>
  <pre class="lang-js prettyprint-override"><code>const response = await pool.query(template);
  
  
  </code></pre>