Skip to content

Instantly share code, notes, and snippets.

@viccherubini
Created December 14, 2009 12:40
Show Gist options
  • Save viccherubini/256017 to your computer and use it in GitHub Desktop.
Save viccherubini/256017 to your computer and use it in GitHub Desktop.
<?php
require_once 'Artisan/Db.php';
require_once 'Artisan/Exception.php';
$db_config = array(
'server' => 'localhost',
'username' => 'username',
'password' => 'password',
'database' => 'dbname'
);
$db = new Artisan_Db($db_config);
try {
$db->connect();
// Do some SQL
$db->disconnect();
} catch ( Artisan_Exception $e ) {
exit('An error occurred: ' . $e->getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment