将数组从url传递到mySQL查询

I have an url which is looking like following:

http://url/app/my.php?my=1,2&limit=2&lastid=0

Where the my paramater length can vary, but is always seperated by a comma. This i would like to add into a mysql query, which i've tried to do like following:

$limit = $_GET['limit'];
$lastid = $_GET['lastid'];
$my = $_GET['my'];


$all_news = $con->prepare("SELECT news.id, news.title, news.url, news.image_url, news.date, news.news_text, news.referer_img from news, team, contain WHERE team.id in (?) AND team.id = contain.team_id AND contain.news_id = news.id ORDER BY news.date DESC LIMIT ?, ?"); 
$all_news->bind_param("iii", $my, $lastid, $limit);
$all_news->execute();
$all_news->bind_result($id, $title, $url, $image_url, $date, $news_text, $referer_img);

I've tried both binding it as a string and int, but te $my array does not seem to work in the query? do i need to explode it and then implode the $my array? or what am i doing wrong?

You can try to parse_str() and parse_url()

$url = parse_url('http://url/app/my.php?my=1,2&limit=2&lastid=0', PHP_URL_QUERY);
parse_str($url);

And access the $my later on

$all_news = $con->prepare("SELECT news.id, news.title, news.url, news.image_url, news.date, news.news_text, news.referer_img from news, team, contain WHERE team.id in (?) AND team.id = contain.team_id AND contain.news_id = news.id ORDER BY news.date DESC LIMIT ?, ?"); 
$all_news->bind_param("iii", $my, $lastid, $limit);
$all_news->execute();
$all_news->bind_result($id, $title, $url, $image_url, $date, $news_text, $referer_img);