1 <?xml version=
"1.0" encoding=
"iso-8859-1"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <!-- template designed by Marco Von Ballmoos -->
6 <title>Docs for page DataUpdate.php
</title>
7 <link rel=
"stylesheet" href=
"../../media/stylesheet.css" />
8 <script src=
"../../media/lib/classTree.js"></script>
9 <script language=
"javascript" type=
"text/javascript">
10 var imgPlus = new Image();
11 var imgMinus = new Image();
12 imgPlus.src =
"../../media/images/plus.png";
13 imgMinus.src =
"../../media/images/minus.png";
15 function showNode(Node){
16 switch(navigator.family){
18 // Nav
4.x code fork...
19 var oTable = document.layers[
"span" + Node];
20 var oImg = document.layers[
"img" + Node];
23 // IE
4/
5 code fork...
24 var oTable = document.all[
"span" + Node];
25 var oImg = document.all[
"img" + Node];
28 // Standards Compliant code fork...
29 var oTable = document.getElementById(
"span" + Node);
30 var oImg = document.getElementById(
"img" + Node);
33 oImg.src = imgMinus.src;
34 oTable.style.display =
"block";
37 function hideNode(Node){
38 switch(navigator.family){
40 // Nav
4.x code fork...
41 var oTable = document.layers[
"span" + Node];
42 var oImg = document.layers[
"img" + Node];
45 // IE
4/
5 code fork...
46 var oTable = document.all[
"span" + Node];
47 var oImg = document.all[
"img" + Node];
50 // Standards Compliant code fork...
51 var oTable = document.getElementById(
"span" + Node);
52 var oImg = document.getElementById(
"img" + Node);
55 oImg.src = imgPlus.src;
56 oTable.style.display =
"none";
59 function nodeIsVisible(Node){
60 switch(navigator.family){
62 // Nav
4.x code fork...
63 var oTable = document.layers[
"span" + Node];
66 // IE
4/
5 code fork...
67 var oTable = document.all[
"span" + Node];
70 // Standards Compliant code fork...
71 var oTable = document.getElementById(
"span" + Node);
74 return (oTable && oTable.style.display ==
"block");
77 function toggleNodeVisibility(Node){
78 if (nodeIsVisible(Node)){
87 <div class=
"page-body">
88 <h2 class=
"file-name"><img src=
"../../media/images/Page_logo.png" alt=
"File" style=
"vertical-align: middle">/DataUpdate.php
</h2>
90 <a name=
"sec-description"></a>
91 <div class=
"info-box">
92 <div class=
"info-box-title">Description
</div>
94 <span class=
"disabled">Description
</span> |
95 <a href=
"#sec-classes">Classes
</a>
96 |
<a href=
"#sec-includes">Includes
</a>
97 |
<a href=
"#sec-functions">Functions
</a>
99 <div class=
"info-box-body">
100 <!-- ========== Info from phpDoc block ========= -->
101 <p class=
"short-description">Some functions and a base class to help with updating records.
</p>
102 <p class=
"description"><p>This subpackage provides some functions that are useful around single record database activities such as insert and update.
</p></p>
104 <li><span class=
"field">author:
</span> Andrew McMillan
<<a href=
"mailto:andrew@mcmillan.net.nz">andrew@mcmillan.net.nz
</a>></li>
105 <li><span class=
"field">copyright:
</span> Catalyst IT Ltd, Morphoss Ltd
<http://www.morphoss.com/
></li>
106 <li><span class=
"field">license:
</span> <a href=
"http://gnu.org/copyleft/gpl.html">GNU GPL v2 or later
</a></li>
112 <a name=
"sec-classes"></a>
113 <div class=
"info-box">
114 <div class=
"info-box-title">Classes
</div>
115 <div class=
"nav-bar">
116 <a href=
"#sec-description">Description
</a> |
117 <span class=
"disabled">Classes
</span>
118 |
<a href=
"#sec-includes">Includes
</a>
119 |
<a href=
"#sec-functions">Functions
</a>
121 <div class=
"info-box-body">
122 <table cellpadding=
"2" cellspacing=
"0" class=
"class-table">
124 <th class=
"class-table-header">Class
</th>
125 <th class=
"class-table-header">Description
</th>
128 <td style=
"padding-right: 2em; vertical-align: top; white-space: nowrap">
129 <img src=
"../../media/images/Class.png"
132 <a href=
"../../awl/DataUpdate/DBRecord.html">DBRecord
</a>
135 A Base class to use for records which will be read/written from the database.
142 <a name=
"sec-includes"></a>
143 <div class=
"info-box">
144 <div class=
"info-box-title">Includes
</div>
145 <div class=
"nav-bar">
146 <a href=
"#sec-description">Description
</a> |
147 <a href=
"#sec-classes">Classes
</a>
148 |
<span class=
"disabled">Includes
</span>
149 |
<a href=
"#sec-functions">Functions
</a>
151 <div class=
"info-box-body">
152 <a name=
"_AwlQuery_php"><!-- --></a>
156 <img src=
"../../media/images/Page.png" alt=
" " />
157 <span class=
"include-title">
158 <span class=
"include-type">require_once
</span>
159 (
<span class=
"include-name"><a href=
"../../awl/AwlDatabase/_AwlQuery.php.html">'AwlQuery.php'
</a></span>)
160 (line
<span class=
"line-number">16</span>)
164 <!-- ========== Info from phpDoc block ========= -->
167 <a name=
"_AWLUtilities_php"><!-- --></a>
168 <div class=
"evenrow">
171 <img src=
"../../media/images/Page.png" alt=
" " />
172 <span class=
"include-title">
173 <span class=
"include-type">require_once
</span>
174 (
<span class=
"include-name"><a href=
"../../awl/Utilities/_AWLUtilities.php.html">'AWLUtilities.php'
</a></span>)
175 (line
<span class=
"line-number">15</span>)
179 <!-- ========== Info from phpDoc block ========= -->
187 <a name=
"sec-functions"></a>
188 <div class=
"info-box">
189 <div class=
"info-box-title">Functions
</div>
190 <div class=
"nav-bar">
191 <a href=
"#sec-description">Description
</a> |
192 <a href=
"#sec-classes">Classes
</a>
193 |
<a href=
"#sec-includes">Includes
</a>
194 |
<span class=
"disabled">Functions
</span>
196 <div class=
"info-box-body">
197 <a name=
"functionsql_from_object" id=
"functionsql_from_object"><!-- --></a>
201 <img src=
"../../media/images/Function.png" />
202 <span class=
"method-title">sql_from_object
</span> (line
<span class=
"line-number">28</span>)
205 <!-- ========== Info from phpDoc block ========= -->
206 <p class=
"short-description">Build SQL INSERT/UPDATE statement from an associative array of fieldnames =
> values.
</p>
208 <li><span class=
"field">return:
</span> An SQL Update or Insert statement with all fields/values from the array.
</li>
210 <div class=
"method-signature">
211 <span class=
"method-result">string
</span>
212 <span class=
"method-name">
215 (
<span class=
"var-type">array
</span> <span class=
"var-name">$obj
</span>,
<span class=
"var-type">string
</span> <span class=
"var-name">$type
</span>,
<span class=
"var-type">string
</span> <span class=
"var-name">$tablename
</span>,
<span class=
"var-type">string
</span> <span class=
"var-name">$where
</span>, [
<span class=
"var-type">string
</span> <span class=
"var-name">$fprefix
</span> =
<span class=
"var-default">&quot;
&quot;
</span>])
218 <ul class=
"parameters">
220 <span class=
"var-type">array
</span>
221 <span class=
"var-name">$obj
</span><span class=
"var-description">: The object of fieldnames =
> values.
</span> </li>
223 <span class=
"var-type">string
</span>
224 <span class=
"var-name">$type
</span><span class=
"var-description">: The word
"update
" or something else (which implies
"insert
").
</span> </li>
226 <span class=
"var-type">string
</span>
227 <span class=
"var-name">$tablename
</span><span class=
"var-description">: The name of the table being updated.
</span> </li>
229 <span class=
"var-type">string
</span>
230 <span class=
"var-name">$where
</span><span class=
"var-description">: What the
"WHERE ...
" clause needs to be for an UPDATE statement.
</span> </li>
232 <span class=
"var-type">string
</span>
233 <span class=
"var-name">$fprefix
</span><span class=
"var-description">: An optional string which all fieldnames in $assoc are prefixed with.
</span> </li>
238 <a name=
"functionsql_from_post" id=
"functionsql_from_post"><!-- --></a>
239 <div class=
"evenrow">
242 <img src=
"../../media/images/Function.png" />
243 <span class=
"method-title">sql_from_post
</span> (line
<span class=
"line-number">110</span>)
246 <!-- ========== Info from phpDoc block ========= -->
247 <p class=
"short-description">Build SQL INSERT/UPDATE statement from the $_POST associative array
</p>
249 <li><span class=
"field">return:
</span> An SQL Update or Insert statement with all fields/values from the array.
</li>
251 <div class=
"method-signature">
252 <span class=
"method-result">string
</span>
253 <span class=
"method-name">
256 (
<span class=
"var-type">string
</span> <span class=
"var-name">$type
</span>,
<span class=
"var-type">string
</span> <span class=
"var-name">$tablename
</span>,
<span class=
"var-type">string
</span> <span class=
"var-name">$where
</span>, [
<span class=
"var-type">string
</span> <span class=
"var-name">$fprefix
</span> =
<span class=
"var-default">&quot;
&quot;
</span>])
259 <ul class=
"parameters">
261 <span class=
"var-type">string
</span>
262 <span class=
"var-name">$type
</span><span class=
"var-description">: The word
"update
" or something else (which implies
"insert
").
</span> </li>
264 <span class=
"var-type">string
</span>
265 <span class=
"var-name">$tablename
</span><span class=
"var-description">: The name of the table being updated.
</span> </li>
267 <span class=
"var-type">string
</span>
268 <span class=
"var-name">$where
</span><span class=
"var-description">: What the
"WHERE ...
" clause needs to be for an UPDATE statement.
</span> </li>
270 <span class=
"var-type">string
</span>
271 <span class=
"var-name">$fprefix
</span><span class=
"var-description">: An optional string which all fieldnames in $assoc are prefixed with.
</span> </li>
279 <p class=
"notes" id=
"credit">
280 Documentation generated on Tue,
28 Dec
2010 02:
01:
36 +
1300 by
<a href=
"http://www.phpdoc.org" target=
"_blank">phpDocumentor
1.4.3</a>