欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

example2.php_php基础

程序员文章站 2022-05-12 20:11:00
...
example2.php
include_once("XML/sql2xml.php");
$sql2xmlclass = new xml_sql2xml("mysql://username:password@localhost/xmltest");
$xmlstring = $sql2xmlclass->getxml("select * from bands left join albums on bands.id = bandsID");
?>


输出结果
$xmlstring = '




1
The Blabbers
1998
London
Rock'n'Roll

1
1
BlaBla
1998
Their first one


2
1
More Talks
2000
The second one



2
Only Stupids
1997
New York
Hip Hop

3
2
All your base...
1999
The Classic





'