输出结果$xmlstring='1TheBlabber..." />
 手机
当前位置:查字典教程网 >编程开发 >php教程 >example2.php
example2.php
摘要:example2.phpgetxml("select*frombandsleftjoinalbumsonbands.id=bandsID")...

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>

'

【example2.php】相关文章:

用PHP 4.2书写安全的脚本

ftp类(example.php)

PHP中显示格式化的用户输入

php 防止表单重复提交方法

在Zeus Web Server中安装PHP语言支持

虚拟主机中对PHP的特殊设置

xml+php动态载入与分页

PHP 中的类

example1.php

人大复印资料处理程序_查询篇

上一篇: 对盗链说再见...
精品推荐
分类导航