存储过程查询包含多个id

drop procedure if exists `inuserIDdata`;
delimiter $$
create procedure inuserIDdata(in datas char(255))
begin
            select count(*) cnt
            from onlineuser as a inner join userinfo as b on a.userID=b.userID 
            left join registip as d on d.ip=b.registIp 
            left join registdevice as e on e.deviceCode=b.registDeviceCode
            where  find_in_set(a.userID,datas);
end;
$$
delimiter ;

你可能感兴趣的:(php,mysql,mysql,sql,php,java)