When we want to retrieve only specific records from the database (e.g., a user with a specific last name), we use the WHERE clause. In PDO, we always do this with prepared statements to prevent the injection of malicious code.
In the example above, we searched our table of 11 records for a user with the last name "Novak". We will use a
named parameter :last_name, which ensures security and clarity.
prepare() when including variables in a WHERE clause.execute() method accepts parameters and executes the query securely.fetch() instead of fetchAll().