I am using MySQL and PHP.
I tried to parameterize the queries using bind_param. Now I need to pass a list of integers to the parameterised IN Query.
I have tried with the below query:
select id,date,
sum(value) as distance ,
(select number from table2 where id=id) as Number
from Table1 where id in (1777,1778,1779)
But it is returning only the result for the first value in the list (1777
).
How can I get the result for all the entries (1777,1778,1779
) in the list?