topical media & game development
professional-php-08-new-DB-test.php / php
<?php
require_once('class.Database.php');
try {
e) {
// No point continuing...
die("Unable to connect to the database.");
}
count = sql);
print "There are db->startTransaction();
// do an insert and an update
try {
arValues['id'] = '#id#';
newID = arValues);
print "The new record has the ID arUpdate = array();
affected = arUpdate, "id = affected records<br>\n";
// write the changes to the database
e) {
// some sort of error happened - abort the transaction
// and print the error message
e->getMessage();
}
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.