PHP如何同时查询多个ID

WBOY
Release: 2016-06-13 11:18:59
Original
870 people have browsed it

PHP怎么同时查询多个ID?

<?php<br />include 'include/cmsdj.conn.php'; <br />$CD_ID=SafeRequest('id','get');<br />        global $db;<br />        $sql='Select * from '.tname('dj').' where CD_ID='.$CD_ID.'';<br />        $row=$db->getrow($sql);<br />        $server=$db->getrow('select * from '.tname('server').' where CD_ID='.$row['CD_Server'].'');<br />        if($row){<br />                $CD_Url=$row['CD_Url'];<br />                        $playurl=$server['CD_Url'].$CD_Url;<br />        echo '<list><m src="'.$playurl.'" label="'.$row['CD_Name'].'"/></list>';}<br />?>
Copy after login


上面代码是只读取单个ID的
显示
XX.php?id=5555

如果我要它显示多个ID的结果呢?
比如:xx.php?id=5555,6666,1111
相对显示的是



要怎么整呢?


------解决方案--------------------
echo ''."\n";
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!