Stored procedure not filtering

This stored procedure is not filtering when called up, I will appreciate any advice:

USE invoicing;
DELIMITER //
CREATE PROCEDURE get_payments(client_id INT, payment_method_id TINYINT)
BEGIN
SELECT *
FROM payments p
WHERE
p.client_id = IFNULL(client_id, p.client_id) AND
p.payment_method = IFNULL(payment_method, p.payment_method);
END //
DELIMITER ;

CALL get_payments(5,2);

Are you using Mosh’s SQL course material?
If you are there is a slight error in your script.
The database ‘invoicing’ doesn’t exists
Try changing:

USE invoicing;
to
USE sql_invoicing

Hope this helps

its basically the same database. same tables

Thanks a lot. I have seen the issue.