PHP Classes

File: ex_query.php

Recommend this page to a friend!
  Classes of Rich Zygler  >  SQL XML  >  ex_query.php  >  Download  
File: ex_query.php
Role: Example script
Content type: text/plain
Description: Example of simple query
Class: SQL XML
Generate XML documents from MySQL query results
Author: By
Last change:
Date: 10 years ago
Size: 462 bytes


Class file image Download

// start db connection
require_once(db.php); // left to the reader to do
                        // must include your mysql db link
require_once(SqlXML.php); // full code to this program below
$sql = SELECT * FROM customers LIMIT 10&#8243;;
$sqlxml =& new SqlXML();
$xml = $sqlxml->query($sql);
<textarea cols="80" rows="40"> . $xml . </textarea>;
// then take that $xml string and transform with the appropriate XSL