The routine below updates the first record when multiple record numbers come through the parameter accounts. Is there a data type that pass comma delimited values like 1,2,3,4,5?
CREATE DEFINER=`root`@`localhost` PROCEDURE `set_admin_accounts_state_zero`(
accounts varchar(300)
)
BEGIN
update administrators set state = 0 where id in (accounts);
END
CREATE DEFINER=`root`@`localhost` PROCEDURE `set_admin_accounts_state_zero`(
accounts varchar(300)
)
BEGIN
update administrators set state = 0 where id in (accounts);
END