example2.php
example2.php <?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 = '' <?xml version="1.0"?> <root> <result> <row> <id>1</id> <name>The Blabbers</name> <birth_year>1998</birth_year> <birth_place>London</birth_place> <genre>Rock''n''Roll</genre> <row> <id>1</id> <bandsID>1</bandsID> <title>BlaBla</title> <year>1998</year> <com |
查看所有评论
