Location: PHPKode > scripts > Remote MySQL Query > remote-mysql-query/class_help.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class RemoteQuery</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
<style type="text/css">
<!--
a { color: #336699; text-decoration: none; }
a:hover { color: #6699CC; text-decoration: underline; }
a:active { color: #6699CC; text-decoration: underline; }
body { background : #FFFFFF; }
body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt }
p, li { line-height: 140% }
a img { border: 0px; }
dd { margin-left: 0px; padding-left: 1em; }
/* Page layout/boxes */
.info-box {}
.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF }
.info-box-body { border: 1px solid #999999; padding: .5em; }
.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; }
.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
.page-body { max-width: 800px; margin: auto; }
.tree dl { margin: 0px }
/* Index formatting classes */
.index-item-body { margin-top: .5em; margin-bottom: .5em}
.index-item-description { margin-top: .25em }
.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt }
.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em}
.index-letter-title { font-size: 12pt; font-weight: bold }
.index-letter-menu { text-align: center; margin: 1em }
.index-letter { font-size: 12pt }
/* Docbook classes */
.description {}
.short-description { font-weight: bold; color: #666666; }
.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; }
.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; }
.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; }
.package { }
.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black }
.package-details { font-size: 85%; }
.sub-package { font-weight: bold; font-size: 120% }
.tutorial { border-width: thin; border-color: #0066ff }
.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; }
.nav-button-disabled { color: #999999; }
.nav-button:active,
.nav-button:focus,
.nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none }
.folder-title { font-style: italic }
/* Generic formatting */
.field { font-weight: bold; }
.detail { font-size: 8pt; }
.notes { font-style: italic; font-size: 8pt; }
.separator { background-color: #999999; height: 2px; }
.warning { color: #FF6600; }
.disabled { font-style: italic; color: #999999; }
/* Code elements */
.line-number { }
.class-table { width: 100%; }
.class-table-header { border-bottom: 1px dotted #666666; text-align: left}
.class-name { color: #000000; font-weight: bold; }
.method-summary { padding-left: 1em; font-size: 8pt }
.method-header { }
.method-definition { margin-bottom: .3em }
.method-title { font-weight: bold; }
.method-name { font-weight: bold; }
.method-signature { font-size: 85%; color: #666666; margin: .5em 0em }
.method-result { font-style: italic; }
.var-summary { padding-left: 1em; font-size: 8pt; }
.var-header { }
.var-title { margin-bottom: .3em }
.var-type { font-style: italic; }
.var-name { font-weight: bold; }
.var-default {}
.var-description { font-weight: normal; color: #000000; }
.include-title { }
.include-type { font-style: italic; }
.include-name { font-weight: bold; }
.const-title { }
.const-name { font-weight: bold; }
/* Syntax highlighting */
.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; }
*[class="src-code"] { line-height : 0.5em }
.src-comm { color: green; }
.src-id { }
.src-inc { color: #0000FF; }
.src-key { color: #0000FF; }
.src-num { color: #CC0000; }
.src-str { color: #66cccc; }
.src-sym { font-weight: bold; }
.src-var { }
.src-php { font-weight: bold; }
.src-doc { color: #009999 }
.src-doc-close-template { color: #0000FF }
.src-doc-coretag { color: #0099FF; font-weight: bold }
.src-doc-inlinetag { color: #0099FF }
.src-doc-internal { color: #6699cc }
.src-doc-tag { color: #0080CC }
.src-doc-template { color: #0000FF }
.src-doc-type { font-style: italic }
.src-doc-var { font-style: italic }
.tute-tag { color: #009999 }
.tute-attribute-name { color: #0000FF }
.tute-attribute-value { color: #0099FF }
.tute-entity { font-weight: bold; }
.tute-comment { font-style: italic }
.tute-inline-tag { color: #636311; font-weight: bold }
/* tutorial */
.authors { }
.author { font-style: italic; font-weight: bold }
.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal }
.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; }
*[class="example"] { line-height : 0.5em }
.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; }
*[class="listing"] { line-height : 0.5em }
.release-info { font-size: 85%; font-style: italic; margin: 1em 0em }
.ref-title-box { }
.ref-title { }
.ref-purpose { font-style: italic; color: #666666 }
.ref-synopsis { }
.title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF }
.cmd-synopsis { margin: 1em 0em }
.cmd-title { font-weight: bold }
.toc { margin-left: 2em; padding-left: 0em }
.courier {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
}
.php1-identifier {color: #0000A0; }
.php1-reservedword {color: #0000FF; }
.php1-space {}
.php1-string {color: #800000; }
.php1-symbol {color: #000080; }
.php1-variable {color: #000000; }
.php1-comment {color: #008000; }
.php1-number {color: #800080; }
-->
</style>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class RemoteQuery</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Remote Query Client Class Executes a query on a remote server. (Requires server file)</p>
<p class="description"><p>July 04, 2007 - Written by Jeff Williams (Initial Release)<br />July 14, 2007 - Improved error handling</p></p>
<ul class="tags">
<li><span class="field">author:</span> Jeff L. Williams</li>
<li><span class="field">version:</span> 1.1</li>
</ul>
<p class="notes">
<a class="field" href="http://www.phpclasses.org/browse/package/4000.html" target="_blank">http://www.phpclasses.org/browse/package/4000.html</a>
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">float</span>
<a href="#$duration" title="details" class="var-name">$duration</a>
</div>
<div class="var-title">
<span class="var-type">string</span>
<a href="#$error" title="details" class="var-name">$error</a>
</div>
<div class="var-title">
<span class="var-type">string</span>
<a href="#$lastSQL" title="details" class="var-name">$lastSQL</a>
</div>
<div class="var-title">
<span class="var-type">integer</span>
<a href="#$rowCount" title="details" class="var-name">$rowCount</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">RemoteQuery</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
([<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$securityKey</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$database</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$server</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$username</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$password</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>])
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#connect" title="details" class="method-name">connect</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$securityKey</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$database</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$server</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$username</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$password</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>])
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#executeQuery" title="details" class="method-name">executeQuery</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>)
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getURL" title="details" class="method-name">getURL</a>
([<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span> = <span class="var-default">''</span>])
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$duration" id="$duration"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">float</span>
<span class="var-name">$duration</span>
(line <span class="line-number">30</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The duration of a query in microseconds</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
</div>
<a name="var$error" id="$error"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">string</span>
<span class="var-name">$error</span>
= <span class="var-default"> ''</span> (line <span class="line-number">51</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Contains the error message returned from the last error</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
</div>
<a name="var$lastSQL" id="$lastSQL"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">string</span>
<span class="var-name">$lastSQL</span>
= <span class="var-default"> ''</span> (line <span class="line-number">44</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The last SQL statement executed</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
</div>
<a name="var$rowCount" id="$rowCount"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">integer</span>
<span class="var-name">$rowCount</span>
= <span class="var-default"> 0</span> (line <span class="line-number">37</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The total number of rows returned from the last query</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">64</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">CONSTRUCTOR</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">RemoteQuery</span>
<span class="method-name">
__construct
</span>
([<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$securityKey</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$database</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$server</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$username</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$password</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$url</span><span class="var-description">: The URL to the Remote Query Server file</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$securityKey</span><span class="var-description">: Security password key (set in the Remote Query Server file)</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$database</span><span class="var-description">: Name of the database</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$server</span><span class="var-description">: Name of the MySQL host server</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$username</span><span class="var-description">: Database user name</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$password</span><span class="var-description">: Database password</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$charset</span><span class="var-description">: Database character set</span> </li>
</ul>
</div>
<a name="methodconnect" id="connect"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">connect</span> (line <span class="line-number">82</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets connection data for the remote database and Remote Query Server</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
connect
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$securityKey</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$database</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$server</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$username</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$password</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$url</span><span class="var-description">: The URL to the Remote Query Server file</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$securityKey</span><span class="var-description">: Security password key (set in the Remote Query Server file)</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$database</span><span class="var-description">: Name of the database</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$server</span><span class="var-description">: Name of the MySQL host server</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$username</span><span class="var-description">: Database user name</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$password</span><span class="var-description">: Database password</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$charset</span><span class="var-description">: Database character set</span> </li>
</ul>
</div>
<a name="methodexecuteQuery" id="executeQuery"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">executeQuery</span> (line <span class="line-number">102</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Executes a query on the remote server</p>
<ul class="tags">
<li><span class="field">return:</span> An associative array containing the result set</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
executeQuery
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$sql</span><span class="var-description">: SQL query to execute on the remote server</span> </li>
</ul>
</div>
<a name="methodgetURL" id="getURL"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getURL</span> (line <span class="line-number">175</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates the full URL with GET parameters to execute a query on the server</p>
<ul class="tags">
<li><span class="field">return:</span> Full URL to return XML result set from remote server</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getURL
</span>
([<span class="var-type">string</span>&nbsp;<span class="var-name">$sql</span> = <span class="var-default">''</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$sql</span><span class="var-description">: SQL query to execute</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
<a href="http://www.phpclasses.org/browse/package/4000.html" target="_blank">http://www.phpclasses.org/browse/package/4000.html</a>
</p>
</div></body>
</html>
Return current item: Remote MySQL Query