Ok, here is the code that gets the data and exports it to
XML:
Query 1:
=============================
mysql_select_db($database_conn_export, $conn_export);
$query_rsEmployees = "SELECT * FROM employees_emp";
$rsEmployees = mysql_query($query_rsEmployees, $conn_export)
or die(mysql_error());
$row_rsEmployees = mysql_fetch_assoc($rsEmployees);
$totalRows_rsEmployees = mysql_num_rows($rsEmployees);
// Begin XMLExport rsEmployees
$xmlExportObj = new XMLExport();
$xmlExportObj->setRecordset($rsEmployees);
$xmlExportObj->addColumn("firstname_emp", "firstname");
$xmlExportObj->addColumn("lastname_emp", "lastname");
$xmlExportObj->addColumn("address_emp", "address");
$xmlExportObj->addColumn("salary_emp", "salary");
$xmlExportObj->setMaxRecords("ALL");
$xmlExportObj->setDBEncoding("ISO-8859-1");
$xmlExportObj->setXMLEncoding("ISO-8859-1");
$xmlExportObj->setXMLFormat("NODES");
$xmlExportObj->setRootNode("company");
$xmlExportObj->setRowNode("employee");
$xmlExportObj->Execute();
// End XMLExport rsEmployees
=============================
Query 2:
=============================
=============================
mysql_select_db($database_data_one, $data_one);
$query_mem_details = "SELECT * FROM wherever where
mem='$mem_number'";
$mem_details = mysql_query($query_mem_details, $data_one) or
die(mysql_error());
$row_mem_details = mysql_fetch_assoc($mem_details);
$totalRows_mem_details = mysql_num_rows($mem_details);
// Begin XMLExport Member Details
$xmlExportObj = new XMLExport();
$xmlExportObj->setRecordset($mem_details);
$xmlExportObj->addColumn("firstname", "firstname");
$xmlExportObj->addColumn("lastname", "lastname");
$xmlExportObj->setMaxRecords("ALL");
$xmlExportObj->setDBEncoding("ISO-8859-1");
$xmlExportObj->setXMLEncoding("ISO-8859-1");
$xmlExportObj->setXMLFormat("NODES");
$xmlExportObj->setRootNode("Member");
$xmlExportObj->setRowNode("Details");
$xmlExportObj->Execute();
// End XMLExport Member Details
=============================
And here is the page that calls these two datasets:
<script type="text/javascript">
<!--
var dsEmployees = new Spry.Data.XMLDataSet("export.php",
"company/employee");
var mem_details = new Spry.Data.XMLDataSet("export.php",
"Member/Details");
//-->
And only the first one appears.
</script>