首頁  >  文章  >  php教程  >  example2.php

example2.php

WBOY
WBOY原創
2016-06-21 09:09:35914瀏覽

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
                

            

        

    


'



陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn