<pre style='color:#000000;background:#ffffff;'><span style='color:#5f5035; background:#ffffe8; '><?php</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * DropsizeMVCf - extension of the SlimFramework and others tools</span>
<span style='color:#3f5fbf; background:#ffffe8; '> *</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@author</span><span style='color:#3f5fbf; background:#ffffe8; '> Isaac Trenado </span><span style='color:#0000e6; background:#ffffe8; '><</span><span style='color:#7144c4; background:#ffffe8; '>isaac.trenado@codigolimpio.com</span><span style='color:#0000e6; background:#ffffe8; '>></span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@copyright</span><span style='color:#3f5fbf; background:#ffffe8; '> 2013 Isaac Trenado</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@link</span><span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#5555dd; background:#ffffe8; '>http://dropsize.codigolimpio.com</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@license</span><span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#5555dd; background:#ffffe8; '>http://dropsize.codigolimpio.com/license.txt</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@version</span><span style='color:#3f5fbf; background:#ffffe8; '> 3.0.1</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@package</span><span style='color:#3f5fbf; background:#ffffe8; '> DropsizeMVCf</span>
<span style='color:#3f5fbf; background:#ffffe8; '> *</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * DropsizeMVCf - Web publishing software</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Copyright 2015 by the contributors</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * This program is free software; you can redistribute it and/or modify</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * it under the terms of the GNU General Public License as published by</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * the Free Software Foundation; either version 2 of the License, or</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * (at your option) any later version.</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * This program is distributed in the hope that it will be useful,</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * GNU General Public License for more details.</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * You should have received a copy of the GNU General Public License</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * along with this program; if not, write to the Free Software</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * This program incorporates work covered by the following copyright and</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * permission notices:</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * DropsizeMVCf is (c) 2013, 2015 </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Isaac Trenado - </span><span style='color:#7144c4; background:#ffffe8; '>isaac.trenado@codigolimpio.com</span><span style='color:#3f5fbf; background:#ffffe8; '> -</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#5555dd; background:#ffffe8; '>http://www.codigolimpio.com</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Wherever third party code has been used, credit has been given in the code's comments.</span>
<span style='color:#3f5fbf; background:#ffffe8; '> *</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * DropsizeMVCf is released under the GPL</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Ejemplo 1 Interactura con DPManager</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@package</span><span style='color:#3f5fbf; background:#ffffe8; '> com.dropsizemvcf</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@author</span><span style='color:#3f5fbf; background:#ffffe8; '> Isaac Trenado</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@since</span><span style='color:#3f5fbf; background:#ffffe8; '> 1.0.0</span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>include</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"./DPManager-Basic.php"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Ejemplos</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * buildDatosToUpdate Construye cadena CAMPO = '</span><span style='color:#797997; background:#ffffe8; '>$valor</span><span style='color:#3f5fbf; background:#ffffe8; '>', CAMPO = '</span><span style='color:#797997; background:#ffffe8; '>$valor</span><span style='color:#3f5fbf; background:#ffffe8; '>'</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * buildSelectQuery Construye cadena SELECT CAMPO, CAMPO FROM </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * TABLA WHERE CAMPO = '</span><span style='color:#797997; background:#ffffe8; '>$cadena</span><span style='color:#3f5fbf; background:#ffffe8; '>' </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * GROUP BY CAMPO ORDER BY CAMPO</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * buildDeleteQuery Construye cadena DELETE FROM TABLA WHERE CAMPO = '%cadena'</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * buildInsertQuery Construye cadena INSERT INTO TABLA (CAMPO, CAMPO) VALUES ('</span><span style='color:#797997; background:#ffffe8; '>$cadena</span><span style='color:#3f5fbf; background:#ffffe8; '>', '</span><span style='color:#797997; background:#ffffe8; '>$cadena</span><span style='color:#3f5fbf; background:#ffffe8; '>');</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * buildUpdateQuery Construye cadena UPDATE TABLA SET CAMPO = '%s', CAMPO = '%s'</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * WHERE CAMPO = '%s'</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Build Datos to update Query</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * // Output : CAMPO1 = 'Valor 1' ,CAMPO2 = 'Valor 2' ,CAMPO3 = 'Valor 3' </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#800000; background:#ffffe8; font-weight:bold; '>array</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#808030; background:#ffffe8; '>[</span><span style='color:#0000e6; background:#ffffe8; '>'CAMPO1'</span><span style='color:#808030; background:#ffffe8; '>]</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>" 'Valor 1' "</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#808030; background:#ffffe8; '>[</span><span style='color:#0000e6; background:#ffffe8; '>'CAMPO2'</span><span style='color:#808030; background:#ffffe8; '>]</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>" 'Valor 2' "</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#808030; background:#ffffe8; '>[</span><span style='color:#0000e6; background:#ffffe8; '>'CAMPO3'</span><span style='color:#808030; background:#ffffe8; '>]</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>" 'Valor 3' "</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$lstUpdateQuery</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>buildDatosToUpdate</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Build Update Set Query</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstUpdateQuery</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Select Query Query Example 1</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * inicializando todos los parametros</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * // Output : SELECT 'Valor 1' , 'Valor 2' , 'Valor 3' FROM NOMBRE_TABLA WHERE CAMPO = 'cadena' LIMIT 0, 10</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$lstSelectQuery</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>buildSelectQuery</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '>                </span><span style='color:#400000; background:#ffffe8; '>implode</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#0000e6; background:#ffffe8; '>","</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"NOMBRE_TABLA"</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"CAMPO = 'cadena' "</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0f4d75; background:#ffffe8; '>false</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0f4d75; background:#ffffe8; '>false</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0f4d75; background:#ffffe8; '>false</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"LIMIT 0, 10"</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Build Simple Select from correct params</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstSelectQuery</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Select Query Query Example 2</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * con agrupamiento</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * // Output : SELECT sum(CAMPO) FROM NOMBRE_TABLA WHERE CAMPO = 'cadena' GROUP BY CAMPO</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$lstSelectQuery2</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>buildSelectQuery</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '>                </span><span style='color:#0000e6; background:#ffffe8; '>"sum(CAMPO)"</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"NOMBRE_TABLA"</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"CAMPO = 'cadena' "</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"CAMPO"</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Build group Query From correct params</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstSelectQuery2</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Select Query Query Example 3</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * con Ordenamiento</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Output : SELECT 'Valor 1' , 'Valor 2' , 'Valor 3' FROM NOMBRE_TABLA WHERE CAMPO = 'cadena' ORDER BY CAMPO DESC</span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$lstSelectQuery3</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>buildSelectQuery</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '>                </span><span style='color:#400000; background:#ffffe8; '>implode</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#0000e6; background:#ffffe8; '>","</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"NOMBRE_TABLA"</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"CAMPO = 'cadena' "</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0f4d75; background:#ffffe8; '>false</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"CAMPO"</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"DESC"</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Build Simple Query From Order By Params</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstSelectQuery3</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * DELETE Query Example 1</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Output : DELETE FROM NOMBRE_TABLA WHERE CAMPO = 'cadena' </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$lstDeleteQuery1</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>buildDeleteQuery</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#0000e6; background:#ffffe8; '>"NOMBRE_TABLA"</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"CAMPO = 'cadena' "</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Build Simple Delete Query From Params</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstDeleteQuery1</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * INSERT Query Example 1</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Output : INSERT INTO NOMBRE_TABLA ( CAMPO1,CAMPO2,CAMPO3) VALUES ( 'Valor 1' , 'Valor 2' , 'Valor 3' )</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$lstInsertQuery1</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>buildInsertQuery</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"NOMBRE_TABLA"</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Build Simple Insert Data From Params array type and table name</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstInsertQuery1</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * UPDATE Query Example 1</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Para este ejemplo, necesitamos construir el SET con DPManager::buildDatosToUpdate(</span><span style='color:#797997; background:#ffffe8; '>$larFields</span><span style='color:#3f5fbf; background:#ffffe8; '>);</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Output : UPDATE NOMBRE_TABLA SET CAMPO1 = 'Valor 1' ,CAMPO2 = 'Valor 2' ,CAMPO3 = 'Valor 3' WHERE CAMPO = 'valor' </span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$lstUpdateQuery1</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>buildUpdateQuery</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#0000e6; background:#ffffe8; '>"NOMBRE_TABLA"</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstUpdateQuery</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"CAMPO = 'valor' "</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Build Simple Update From Params array type, table name and condition to affect rows</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$lstUpdateQuery1</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#c0bd92; background:#ffffe8; '>/</span><span style='color:#3f5fbf; background:#ffffe8; '></span>
<span style='color:#3f5fbf; background:#ffffe8; '> * Poder iterar resultados de base de datos, Object u Array aplicando un metodo</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * de regreso</span>
<span style='color:#3f5fbf; background:#ffffe8; '> * </span><span style='color:#005fd2; background:#ffffe8; '>@param</span><span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#bb7977; background:#ffffe8; '>array</span><span style='color:#3f5fbf; background:#ffffe8; '> </span>
<span style='color:#3f5fbf; background:#ffffe8; '> </span><span style='color:#c0bd92; background:#ffffe8; '>*/</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$array</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#800000; background:#ffffe8; font-weight:bold; '>array</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#800000; background:#ffffe8; font-weight:bold; '>array</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#008c00; background:#ffffe8; '>1</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#008c00; background:#ffffe8; '>2</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#800000; background:#ffffe8; font-weight:bold; '>array</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#008c00; background:#ffffe8; '>3</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#008c00; background:#ffffe8; '>4</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#797997; background:#ffffe8; '>$result</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> DPManager</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#800080; background:#ffffe8; '>:</span><span style='color:#000000; background:#ffffe8; '>iteraRecord</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#797997; background:#ffffe8; '>$array</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#800000; background:#ffffe8; font-weight:bold; '>function</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#800080; background:#ffffe8; '>{</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '>    </span><span style='color:#797997; background:#ffffe8; '>$row</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#400000; background:#ffffe8; '>func_get_args</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '>    </span>
<span style='color:#000000; background:#ffffe8; '>    </span><span style='color:#797997; background:#ffffe8; '>$uno</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$row</span><span style='color:#808030; background:#ffffe8; '>[</span><span style='color:#008c00; background:#ffffe8; '>0</span><span style='color:#808030; background:#ffffe8; '>]</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>.</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"UNO"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '>    </span><span style='color:#797997; background:#ffffe8; '>$dos</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>=</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$row</span><span style='color:#808030; background:#ffffe8; '>[</span><span style='color:#008c00; background:#ffffe8; '>1</span><span style='color:#808030; background:#ffffe8; '>]</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#808030; background:#ffffe8; '>.</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"DOS"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '>    </span><span style='color:#800000; background:#ffffe8; font-weight:bold; '>return</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#800000; background:#ffffe8; font-weight:bold; '>array</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#797997; background:#ffffe8; '>$uno</span><span style='color:#808030; background:#ffffe8; '>,</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#797997; background:#ffffe8; '>$dos</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800080; background:#ffffe8; '>}</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<h1>Aplicaci&oacute;n de m&eacute;todo anonimo a cada uno "</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#808030; background:#ffffe8; '>.</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"de los elementos del objeto o arreglo</h1>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"<pre>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#400000; background:#ffffe8; '>print_r</span><span style='color:#808030; background:#ffffe8; '>(</span><span style='color:#797997; background:#ffffe8; '>$result</span><span style='color:#808030; background:#ffffe8; '>)</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
<span style='color:#800000; background:#ffffe8; font-weight:bold; '>echo</span><span style='color:#000000; background:#ffffe8; '> </span><span style='color:#0000e6; background:#ffffe8; '>"</pre>"</span><span style='color:#800080; background:#ffffe8; '>;</span><span style='color:#000000; background:#ffffe8; '></span>
</pre>