1连接数据库 mysql_connect('localhost',‘root’,'123456');
mysql_select_db('dbname');
2提取特定id:$sql="select * from table_name where id in(1,2,3)";
执行sql获得结果集,$result = mysql_query($sql);
$row = array();
3循环输出模板内容,
while($row=mysql_fetch_assoc($result)){
echo '