Location: PHPKode > projects > MySQL-XML > docs/document.inc.source.html
<HTML>
<HEAD><TITLE>PHPXref : /document.inc source</TITLE></HEAD>
<BODY BGCOLOR="#EEEEE0" TEXT="#330505" LINK="#801800" VLINK="#300540" ALINK="#FFFFFF">
<TABLE BORDER=0 WIDTH=100%>
	<TR BGCOLOR="553333"><TD ALIGN="RIGHT">
		<FONT SIZE=+2 COLOR="#FFFFFF"><I>PHPXref Example</I></FONT>
	</TD></TR>
</TABLE>
<BR><BR>


<!-- Generated by PHPXref 0.2 at Wed Oct 30 08:50:37 2002 -->
<!-- PHPXref (c) 2000,2001 Gareth Watts - hide@address.com -->
<!-- http://phpxref.sourceforge.net/ -->

<SCRIPT LANGUAGE="JavaScript">
<!--
ext='.html';
relbase='';
function jump() {
    if (document.search.funcname.value.length) {
		funcname=document.search.funcname.value.replace(/[()]/g,'');
		funcname=document.search.funcname.value.toLowerCase();
        window.location=relbase+'_functions/'+escape(escape(funcname))+ext;
	}
    if (document.search.varname.value.length) {
		varname=document.search.varname.value.replace(/[$]/g,'');
        window.location=relbase+'_variables/'+escape(escape(varname))+ext;
	}
    if (document.search.tablename.value.length) {
		tablename=document.search.tablename.value.toLowerCase();
        window.location=relbase+'_tables/'+escape(escape(tablename))+ext;
	}
    return false;
}

document.writeln('<TABLE ALIGN="RIGHT" BORDER=0>');
document.writeln('<TR BGCOLOR="#000000"><TD>');
document.writeln('<CENTER><FONT SIZE=-1 COLOR="#EEEEEE"><B>Lookup</B></FONT></CENTER>');
document.writeln('</TD></TR>');

document.writeln('<TR BGCOLOR="#DDDDD0"><TD ALIGN="RIGHT">');
document.writeln('<FONT SIZE=-1>');
document.writeln('<FORM NAME="search" onSubmit=\'return jump()\'>');
document.writeln('<A HREF="_functions/index.html">Function</A>: ');
document.writeln('<INPUT TYPE="TEXT" SIZE=10 VALUE="" NAME="funcname" onChange=\'jump()\'><BR>');
document.writeln('<A HREF="_variables/index.html">Variable</A>: ');
document.writeln('<INPUT TYPE="TEXT" SIZE=10 VALUE="" NAME="varname" onChange=\'jump()\'><BR>');
document.writeln('<A HREF="_tables/index.html">Table</A>: ');
document.writeln('<INPUT TYPE="TEXT" SIZE=10 VALUE="" NAME="tablename" onChange=\'jump()\'><BR>');
document.writeln('</FORM>');
document.writeln('</FONT>');
document.writeln('</TD></TR></TABLE>');
// -->
</SCRIPT>
<FONT FACE="Clean" SIZE=-2>
<A HREF="./index.html">/</A> -> <A HREF="document.inc.html">document.inc</A><BR><P>
<A NAME="l1"><FONT SIZE=-2 COLOR="#555555">1</FONT>&nbsp;</A> &lt;?<BR>
<A NAME="l2"><FONT SIZE=-2 COLOR="#555555">2</FONT>&nbsp;</A> class DOCUMENT {<BR>
<A NAME="l3"><FONT SIZE=-2 COLOR="#555555">3</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** the name of the document */<BR>
<A NAME="l4"><FONT SIZE=-2 COLOR="#555555">4</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/name.html">$name</A>;<BR>
<A NAME="l5"><FONT SIZE=-2 COLOR="#555555">5</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** the id of the document used<BR>
<A NAME="l6"><FONT SIZE=-2 COLOR="#555555">6</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for internal purposes */<BR>
<A NAME="l7"><FONT SIZE=-2 COLOR="#555555">7</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/id.html">$id</A>;<BR>
<A NAME="l8"><FONT SIZE=-2 COLOR="#555555">8</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** the root element */<BR>
<A NAME="l9"><FONT SIZE=-2 COLOR="#555555">9</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var <A HREF="_variables/root.html">$root</A> = null;<BR>
<A NAME="l10"><FONT SIZE=-2 COLOR="#555555">10</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l11"><FONT SIZE=-2 COLOR="#555555">11</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add document to database */<BR>
<A NAME="l12"><FONT SIZE=-2 COLOR="#555555">12</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/add.html">add</A>() {<BR>
<A NAME="l13"><FONT SIZE=-2 COLOR="#555555">13</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** use global db link */<BR>
<A NAME="l14"><FONT SIZE=-2 COLOR="#555555">14</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;global <A HREF="_variables/db.html">$db</A>;<BR>
<A NAME="l15"><FONT SIZE=-2 COLOR="#555555">15</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add to DOCUMENTS and get ID */<BR>
<A NAME="l16"><FONT SIZE=-2 COLOR="#555555">16</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;INSERT INTO DOCUMENTS SET<BR>
<A NAME="l17"><FONT SIZE=-2 COLOR="#555555">17</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME = '<A HREF="_variables/this.html">$this</A>-&gt;name'&quot;;<BR>
<A NAME="l18"><FONT SIZE=-2 COLOR="#555555">18</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l19"><FONT SIZE=-2 COLOR="#555555">19</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;id = <A HREF="_functions/mysql_insert_id.html">mysql_insert_id</A>(<A HREF="_variables/db.html">$db</A>);<BR>
<A NAME="l20"><FONT SIZE=-2 COLOR="#555555">20</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add root element if it isn't null */<BR>
<A NAME="l21"><FONT SIZE=-2 COLOR="#555555">21</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/if.html">if</A>(<A HREF="_variables/this.html">$this</A>-&gt;root != null) {<BR>
<A NAME="l22"><FONT SIZE=-2 COLOR="#555555">22</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;<A HREF="_functions/add_root_element.html">add_root_element</A>(<A HREF="_variables/this.html">$this</A>-&gt;root);<BR>
<A NAME="l23"><FONT SIZE=-2 COLOR="#555555">23</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;UPDATE DOCUMENTS SET<BR>
<A NAME="l24"><FONT SIZE=-2 COLOR="#555555">24</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ROOT_ELEMENT = &quot;.<A HREF="_variables/this.html">$this</A>-&gt;root-&gt;id.&quot;<BR>
<A NAME="l25"><FONT SIZE=-2 COLOR="#555555">25</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ID = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l26"><FONT SIZE=-2 COLOR="#555555">26</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l27"><FONT SIZE=-2 COLOR="#555555">27</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l28"><FONT SIZE=-2 COLOR="#555555">28</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l29"><FONT SIZE=-2 COLOR="#555555">29</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l30"><FONT SIZE=-2 COLOR="#555555">30</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/become_by_name.html">become_by_name</A>(<A HREF="_variables/name.html">$name</A>) {<BR>
<A NAME="l31"><FONT SIZE=-2 COLOR="#555555">31</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT ID FROM DOCUMENTS WHERE NAME = '<A HREF="_variables/name.html">$name</A>'&quot;;<BR>
<A NAME="l32"><FONT SIZE=-2 COLOR="#555555">32</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l33"><FONT SIZE=-2 COLOR="#555555">33</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l34"><FONT SIZE=-2 COLOR="#555555">34</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/results.html">$results</A>[0]);<BR>
<A NAME="l35"><FONT SIZE=-2 COLOR="#555555">35</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l36"><FONT SIZE=-2 COLOR="#555555">36</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l37"><FONT SIZE=-2 COLOR="#555555">37</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/become.html">become</A>(<A HREF="_variables/id.html">$id</A>) {<BR>
<A NAME="l38"><FONT SIZE=-2 COLOR="#555555">38</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;id = <A HREF="_variables/id.html">$id</A>;<BR>
<A NAME="l39"><FONT SIZE=-2 COLOR="#555555">39</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;root = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l40"><FONT SIZE=-2 COLOR="#555555">40</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT ROOT_ELEMENT, NAME FROM <BR>
<A NAME="l41"><FONT SIZE=-2 COLOR="#555555">41</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DOCUMENTS WHERE ID = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l42"><FONT SIZE=-2 COLOR="#555555">42</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l43"><FONT SIZE=-2 COLOR="#555555">43</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_fetch_array.html">mysql_fetch_array</A>(<A HREF="_variables/results.html">$results</A>);<BR>
<A NAME="l44"><FONT SIZE=-2 COLOR="#555555">44</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;name = <A HREF="_variables/results.html">$results</A>[&quot;NAME&quot;];<BR>
<A NAME="l45"><FONT SIZE=-2 COLOR="#555555">45</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;root-&gt;<A HREF="_functions/become.html">become</A>(<A HREF="_variables/results.html">$results</A>[&quot;ROOT_ELEMENT&quot;]);<BR>
<A NAME="l46"><FONT SIZE=-2 COLOR="#555555">46</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l47"><FONT SIZE=-2 COLOR="#555555">47</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l48"><FONT SIZE=-2 COLOR="#555555">48</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/delete.html">delete</A>() {<BR>
<A NAME="l49"><FONT SIZE=-2 COLOR="#555555">49</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** delete root element */<BR>
<A NAME="l50"><FONT SIZE=-2 COLOR="#555555">50</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;root-&gt;<A HREF="_functions/delete.html">delete</A>();<BR>
<A NAME="l51"><FONT SIZE=-2 COLOR="#555555">51</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** delete DOCUMENT entry */<BR>
<A NAME="l52"><FONT SIZE=-2 COLOR="#555555">52</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;DELETE FROM DOCUMENTS WHERE<BR>
<A NAME="l53"><FONT SIZE=-2 COLOR="#555555">53</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ID = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l54"><FONT SIZE=-2 COLOR="#555555">54</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l55"><FONT SIZE=-2 COLOR="#555555">55</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l56"><FONT SIZE=-2 COLOR="#555555">56</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l57"><FONT SIZE=-2 COLOR="#555555">57</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** update DOCUMENT entry */<BR>
<A NAME="l58"><FONT SIZE=-2 COLOR="#555555">58</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/update.html">update</A>() {<BR>
<A NAME="l59"><FONT SIZE=-2 COLOR="#555555">59</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;UPDATE DOCUMENTS SET<BR>
<A NAME="l60"><FONT SIZE=-2 COLOR="#555555">60</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME = '<A HREF="_variables/this.html">$this</A>-&gt;name',<BR>
<A NAME="l61"><FONT SIZE=-2 COLOR="#555555">61</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ROOT_ELEMENT = &quot;.<A HREF="_variables/this.html">$this</A>-&gt;root-&gt;id.&quot;<BR>
<A NAME="l62"><FONT SIZE=-2 COLOR="#555555">62</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE ID = <A HREF="_variables/this.html">$this</A>-&gt;id&quot;;<BR>
<A NAME="l63"><FONT SIZE=-2 COLOR="#555555">63</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/results.html">$results</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l64"><FONT SIZE=-2 COLOR="#555555">64</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l65"><FONT SIZE=-2 COLOR="#555555">65</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l66"><FONT SIZE=-2 COLOR="#555555">66</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** return the XML data of the root element */<BR>
<A NAME="l67"><FONT SIZE=-2 COLOR="#555555">67</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/getxml.html">getXML</A>() {<BR>
<A NAME="l68"><FONT SIZE=-2 COLOR="#555555">68</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l69"><FONT SIZE=-2 COLOR="#555555">69</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/tmp.html">$tmp</A> = <A HREF="_variables/this.html">$this</A>-&gt;root;<BR>
<A NAME="l70"><FONT SIZE=-2 COLOR="#555555">70</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/rvalue.html">$rvalue</A> = &quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;\n&quot;;<BR>
<A NAME="l71"><FONT SIZE=-2 COLOR="#555555">71</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/rvalue.html">$rvalue</A> .= &quot;&lt;?xml-stylesheet type=\&quot;text/xsl\&quot; href=\&quot;ClientTrack.xsl\&quot;?&gt;\n&quot;;<BR>
<A NAME="l72"><FONT SIZE=-2 COLOR="#555555">72</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/rvalue.html">$rvalue</A> .= <A HREF="_functions/strtolower.html">strtolower</A>(<A HREF="_variables/tmp.html">$tmp</A>-&gt;<A HREF="_functions/getxml.html">getXML</A>());<BR>
<A NAME="l73"><FONT SIZE=-2 COLOR="#555555">73</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/rvalue.html">$rvalue</A>;<BR>
<A NAME="l74"><FONT SIZE=-2 COLOR="#555555">74</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l75"><FONT SIZE=-2 COLOR="#555555">75</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<A NAME="l76"><FONT SIZE=-2 COLOR="#555555">76</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** add root element */<BR>
<A NAME="l77"><FONT SIZE=-2 COLOR="#555555">77</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/add_root_element.html">add_root_element</A>(<A HREF="_variables/element.html">$element</A>) {<BR>
<A NAME="l78"><FONT SIZE=-2 COLOR="#555555">78</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;root = new <A HREF="_functions/element.html">ELEMENT</A>();<BR>
<A NAME="l79"><FONT SIZE=-2 COLOR="#555555">79</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;root = <A HREF="_variables/element.html">$element</A>;<BR>
<A NAME="l80"><FONT SIZE=-2 COLOR="#555555">80</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;root-&gt;document = <A HREF="_variables/this.html">$this</A>-&gt;id;<BR>
<A NAME="l81"><FONT SIZE=-2 COLOR="#555555">81</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/this.html">$this</A>-&gt;root-&gt;<A HREF="_functions/add.html">add</A>();<BR>
<A NAME="l82"><FONT SIZE=-2 COLOR="#555555">82</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l83"><FONT SIZE=-2 COLOR="#555555">83</FONT>&nbsp;</A> <BR>
<A NAME="l84"><FONT SIZE=-2 COLOR="#555555">84</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/** get element conflicts */<BR>
<A NAME="l85"><FONT SIZE=-2 COLOR="#555555">85</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <A HREF="_functions/search_elements.html">search_elements</A>(<A HREF="_variables/attname.html">$attname</A>, <A HREF="_variables/attvalue.html">$attvalue</A>) {<BR>
<A NAME="l86"><FONT SIZE=-2 COLOR="#555555">86</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/query.html">$query</A> = &quot;SELECT ELEMENT FROM ATTRIBUTES WHERE<BR>
<A NAME="l87"><FONT SIZE=-2 COLOR="#555555">87</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME = '<A HREF="_variables/attname.html">$attname</A>' AND<BR>
<A NAME="l88"><FONT SIZE=-2 COLOR="#555555">88</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUE = '<A HREF="_variables/attvalue.html">$attvalue</A>'&quot;;<BR>
<A NAME="l89"><FONT SIZE=-2 COLOR="#555555">89</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/result.html">$result</A> = <A HREF="_functions/mysql_query.html">mysql_query</A>(<A HREF="_variables/query.html">$query</A>);<BR>
<A NAME="l90"><FONT SIZE=-2 COLOR="#555555">90</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/rvalue.html">$rvalue</A> = <A HREF="_functions/array.html">array</A>();<BR>
<A NAME="l91"><FONT SIZE=-2 COLOR="#555555">91</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/for.html">for</A>(<A HREF="_variables/i.html">$i</A> = 0; <A HREF="_variables/i.html">$i</A> &lt; <A HREF="_functions/mysql_num_rows.html">mysql_num_rows</A>(<A HREF="_variables/result.html">$result</A>); <A HREF="_variables/i.html">$i</A>++) {<BR>
<A NAME="l92"><FONT SIZE=-2 COLOR="#555555">92</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/row.html">$row</A> = <A HREF="_functions/mysql_fetch_row.html">mysql_fetch_row</A>(<A HREF="_variables/result.html">$result</A>);<BR>
<A NAME="l93"><FONT SIZE=-2 COLOR="#555555">93</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_functions/array_push.html">array_push</A>(<A HREF="_variables/rvalue.html">$rvalue</A>, <A HREF="_variables/row.html">$row</A>[0]);<BR>
<A NAME="l94"><FONT SIZE=-2 COLOR="#555555">94</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l95"><FONT SIZE=-2 COLOR="#555555">95</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="_variables/rvalue.html">$rvalue</A> = <A HREF="_functions/array_unique.html">array_unique</A>(<A HREF="_variables/rvalue.html">$rvalue</A>);<BR>
<A NAME="l96"><FONT SIZE=-2 COLOR="#555555">96</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return <A HREF="_variables/rvalue.html">$rvalue</A>;<BR>
<A NAME="l97"><FONT SIZE=-2 COLOR="#555555">97</FONT>&nbsp;</A> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
<A NAME="l98"><FONT SIZE=-2 COLOR="#555555">98</FONT>&nbsp;</A> }<BR>
<A NAME="l99"><FONT SIZE=-2 COLOR="#555555">99</FONT>&nbsp;</A> ?&gt;
</FONT>
<BR><HR>
<TABLE WIDTH=100%>
	<TR><TD>Generated: Wed Oct 30 08:50:37 2002</TD>
	<TD ALIGN="RIGHT"><I>Generated by <A HREF="http://phpxref.sourceforge.net/">PHPXref 0.2</A></I></TD>
	</TR>
</TABLE>
</BODY></HTML>
Return current item: MySQL-XML