PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Subramani   MySQL to XML   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example program to explain
Class: MySQL to XML
Generate XML document from a MySQL database data
Author: By
Last change:
Date: 19 years ago
Size: 537 bytes
 

Contents

Class file image Download
<?
require("xmlclass.inc");

$host ="localhost";
$username = "root";
$pwd ="LIBERTY7";
$dbname ="Student";

$xmlobj = new createXml();
$xmlobj->mysql_dbasetoxml($host,$username,$pwd,$dbname);//convert all table records into xml

$sql = "select p.regno as Register_Number, name as Student_Name,total as Total,average as Average,rank as Rank from personal p ,academic a where p.regno=a.regno and a.regno=p.regno";

$xmlobj->mysqltoxml($host,$username,$pwd,$dbname,$sql);//convert to xml only the datas retrieved from sql

?>