<?php
require('path/to/DatabaseAccess.Class.php');
$DbAccess = new DatabaseAccess("yourHost", "dbName", "dbUser", "dbUserPassword");
// The array containing the values to use. This could be a cleaned up POST from a form
$arrayOfValues = array(
'ID' => 1000, // Make sure you include the value of the UniqueID
'FirstName' => 'Bob',
'LastName' => 'Moore',
'City' => 'Somewhere',
'State' => 'SomeState',
'Password' => 'DontUsePlainText'
);
// Just call this and Done
$numberOfRowsUpdated = $DbAccess->UpdateTableViaArrayByID("UserAccounts", "ID", $arrayOfValues);
|