Location: PHPKode > scripts > MySQL/HTML-Client > mysqlhtml-client/modules/to_xml.php
<?php
    include_once("../config.inc.php");
    
    if ($cfg_host[$conn])
        $host = $cfg_host[$conn];
        
    if ($cfg_user[$conn])
        $user = $cfg_user[$conn];
        
    if ($cfg_password[$conn])
        $password = $cfg_password[$conn];           
            
    if ($onlydatabase[$conn])
        $database = $onlydatabase[$conn];
    
    if(!$query_text)
        $query_text = "SELECT * FROM " . $table;

    $dsn = "mysql://" . $user . ":" . $password . "@" . $host . "/" . $database;

    include_once("../pear/sql2xml.php");
    $sql2xml =& new xml_sql2xml($dsn);
    $sql2xml->Add($query_text);
    echo $xmlstring = $sql2xml->getXML();
?>
Return current item: MySQL/HTML-Client