- <?php
- /**
- * Replace Example
- *
- * This example show how to use the Replace method.
- * @package AbstractDB
- * @author Pacific-Cybersoft
- * @copyright (C) 2005 Pacific-Cybersoft. All Rights Reserved.
- * @version v 1.0.2
- * @license http://www.gnu.org/copyleft/lesser.txt GNU Lesser General Public License
- */
- /**
- * Include the AbstractDB main class.
- */
- include("../abstractdb.class.php");
- // Instatiate AbstractDB
- $db = new AbstractDB(array("ConnectionString"=>"mysql://username:password@localhost/mydatabase"));
- $fields = array(
- "PrimaryKeyField"=>array("Type"=>"numeric", "Key"=>true, "Value"=>1, "Null"=>false),
- "Field2"=>array("Type"=>"text", "Key"=>false, "Value"=>"replaced value", "Null"=>false),
- "Field3"=>array("Type"=>"text", "Key"=>false, "Value"=>"", "Null"=>true));
- // Execute a REPLACE Query
- if(!$db->Replace("tablename", $fields))
- die($db->GetLastError());
- // Always good practice to close AbstractDB at the end of each script.
- $db->Close();
- ?>
Documentation generated on Wed, 16 Mar 2005 23:17:04 +1100 by phpDocumentor 1.3.0RC3