How to cleanly write SQL get functions in PHP with params?


I’m working on a PHP application where we have helper functions to run our SQL queries on our MariaDB database. The queries are formatted as strings and then we call a helper function select, update, etc. I have a getUsers function that originally took no parameters and returned a list of all of the users in the application. Now, if I want a list of users of a certain type, is it better that I create an entirely new function getUsersOfType, or should I add a parameter to the function getUsers(type = true) and conditionally query based on that? Which way follows SOLID principles the best while keeping the code slim?