Jaulm 0 Newbie Poster

Using MySQL..I have a stored procedure that contains an input parameter defined as a text value. A list of ids are passed in through that parameter... the input parameter is used in the where clause of a select within the stored procedure, however, currently I have this created as a prepared statement in order for it tow work. However, I would like to be able to do it without using a prepared statement... is this possible??.

For example.. my current stored procedure looks something like this:

create procedure mytest(in mylist text) as
begin
preparedstmt= concat("select * from table
where id in (",mylist,");");
.
.
.
end

This works find and will select multiple rows with call mytest(1,2,3,4);

however, if I remove all the prepared statement stuff and call mytest(1,2,3,4) it only returns 1 row as it only seems to look at the first value. I believe the reason for using the prepare statement has to do with parameter datatypes as text not being handled correctly without it when it is more than one value type thing... Anyone have any recommendations on how I can do the same thing with out the prepare statement??? Thanks in advance!