Login   Register  
PHP Classes
elePHPant
Icontem

File: ex_query.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2005-11-16 04:34
Size: 462 bytes
 

Contents

Class file image Download
<?php

// 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);
echo 
<textarea cols="80" rows="40">’ $xml </textarea>;
 
// then take that $xml string and transform with the appropriate XSL

?>