Location: PHPKode > scripts > Singleton PDO > singleton-pdo/MyPDO.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 MyPDO</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class MyPDO</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-descendents">Descendents</a>
			|													<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-consts">Constants</a>
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Custom PDO class - add your own methods here!</p>
	<ul class="tags">
				<li><span class="field">author:</span> Michal &quot;Techi&quot; Vrchota &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
				<li><span class="field">license:</span> <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a></li>
				<li><span class="field">version:</span> 1.00</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_spdo.php.html">/spdo.php</a> (line <span class="field">19</span>)
		</p>
		
				
		<pre>PDO
   |
   --MyPDO</pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
															<a href="#sec-consts">Constants</a>
							
					</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Database/SPDO.html">SPDO</a></td>
					<td>
											Singleton implementation of PDO class
										</td>
				</tr>
							</table>
		</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-descendents">Descendents</a> |
															<a href="#sec-consts">Constants</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">void</span>
										<a href="#modifyTable" title="details" class="method-name">modifyTable</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$table</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$set</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$condition</span> = <span class="var-default">&quot;&quot;</span>])
									</div>
								</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-descendents">Descendents</a> |
																		<a href="#sec-consts">Constants</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="methodmodifyTable" id="modifyTable"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">modifyTable</span> (line <span class="line-number">36</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Usefull for easy table modification (insert or update line)  all variables are added into slashes and dangerous characters are escaped  NULL pointers are re-transformed to NULL in SQL language  Does not support inner SQL functions! such as NOW() etc.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">uses:</span> InvalidArgumentException</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			modifyTable
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$table</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$set</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$condition</span> = <span class="var-default">&quot;&quot;</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$table</span><span class="var-description">: target SQL table</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$set</span><span class="var-description">: array with items to update/insert</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$condition</span><span class="var-description">: SQL condition if UPDATE table</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname">PDO (Internal Class)</span></p>
					<blockquote>
													<span class="method-name">constructor __construct (  )</span><br>
													<span class="method-name">beginTransaction (  )</span><br>
													<span class="method-name">commit (  )</span><br>
													<span class="method-name">errorCode (  )</span><br>
													<span class="method-name">errorInfo (  )</span><br>
													<span class="method-name">exec (  )</span><br>
													<span class="method-name">getAttribute (  )</span><br>
													<span class="method-name">getAvailableDrivers (  )</span><br>
													<span class="method-name">lastInsertId (  )</span><br>
													<span class="method-name">prepare (  )</span><br>
													<span class="method-name">query (  )</span><br>
													<span class="method-name">quote (  )</span><br>
													<span class="method-name">rollBack (  )</span><br>
													<span class="method-name">setAttribute (  )</span><br>
													<span class="method-name">__sleep (  )</span><br>
													<span class="method-name">__wakeup (  )</span><br>
											</blockquote>
										
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
										<a href="#sec-var-summary">Constants</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">
										<h4>Inherited Constants</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname">PDO (Internal Class)</span></p>
					<blockquote>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_AUTOCOMMIT = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_CASE = 8</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_CLIENT_VERSION = 5</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_CONNECTION_STATUS = 7</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_CURSOR = 10</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_CURSOR_NAME = 9</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_DRIVER_NAME = 16</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_EMULATE_PREPARES = 19</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_ERRMODE = 3</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_FETCH_CATALOG_NAMES = 15</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_FETCH_TABLE_NAMES = 14</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_MAX_COLUMN_LEN = 18</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_ORACLE_NULLS = 11</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_PERSISTENT = 12</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_PREFETCH = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_SERVER_INFO = 6</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_SERVER_VERSION = 4</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_STATEMENT_CLASS = 13</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_STRINGIFY_FETCHES = 17</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ATTR_TIMEOUT = 2</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">CASE_LOWER = 2</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">CASE_NATURAL = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">CASE_UPPER = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">CURSOR_FWDONLY = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">CURSOR_SCROLL = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ERRMODE_EXCEPTION = 2</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ERRMODE_SILENT = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ERRMODE_WARNING = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">ERR_NONE = '00000'</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_ASSOC = 2</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_BOTH = 4</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_BOUND = 6</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_CLASS = 8</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_CLASSTYPE = 262144</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_COLUMN = 7</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_FUNC = 10</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_GROUP = 65536</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_INTO = 9</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_LAZY = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_NAMED = 11</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_NUM = 3</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_OBJ = 5</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_ORI_ABS = 4</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_ORI_FIRST = 2</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_ORI_LAST = 3</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_ORI_NEXT = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_ORI_PRIOR = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_ORI_REL = 5</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_SERIALIZE = 524288</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">FETCH_UNIQUE = 196608</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">MYSQL_ATTR_DIRECT_QUERY = 1006</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">MYSQL_ATTR_INIT_COMMAND = 1002</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">MYSQL_ATTR_LOCAL_INFILE = 1001</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">MYSQL_ATTR_MAX_BUFFER_SIZE = 1005</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">MYSQL_ATTR_READ_DEFAULT_FILE = 1003</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">MYSQL_ATTR_READ_DEFAULT_GROUP = 1004</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">MYSQL_ATTR_USE_BUFFERED_QUERY = 1000</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">NULL_EMPTY_STRING = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">NULL_NATURAL = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">NULL_TO_STRING = 2</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_BOOL = 5</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_EVT_ALLOC = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_EVT_EXEC_POST = 3</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_EVT_EXEC_PRE = 2</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_EVT_FETCH_POST = 5</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_EVT_FETCH_PRE = 4</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_EVT_FREE = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_EVT_NORMALIZE = 6</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_INPUT_OUTPUT = -2147483648</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_INT = 1</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_LOB = 3</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_NULL = 0</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_STMT = 4</span><br>
							</span>
													<img src="../media/images/Variable.png" />
							<span class="const-title">
								<span class="const-name">PARAM_STR = 2</span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated on Sat, 14 Oct 2006 16:32:06 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0</a>
	</p>
	</div></body>
</html>
Return current item: Singleton PDO