Dynamic 'Where' Clauses With Parameterized Queries in Node.js and MySQL

Occassionally when writing SQL queries the number of fields that we need to filter on may change depending on user selection. Let’s take a look at how we can build dynamic ‘where’ clauses and the corresponding parameter array to handle this scenario.

Read more »

Performing 'like' Queries Using the MySQL Package in Node.js

The MySQL package is a hugely popular library for working with MySQL from Node.js, and with good reason. It’s performant, easy to use, battle tested, and well documented. I was a bit surprised, however, that the documentation doesn’t show the syntax for performing parameterized ‘like’ queries.

Read more »