Okay, maybe I'm totally nuts, but shouldn't this work:
Here's the ContentManager codePHP Code:include("config.php");
include("DatabaseManager.php");
include("ContentManager.php");
$dbmgr = new DatabaseManager($dbServer, $dbUsername, $dbPassword, $dbName);
echo ( "DatabaseManager dbmgr created." );
$cnmgr = new ContentManager($dbmgr);
Can anybody tell me why this isn't working? it apparently stops executing where I create $cnmgr. (I don't have any debug settings or error message display on my serverPHP Code:class ContentManager() {
var $dbmgr;
function ContentManager($dbmgr) {
$this->dbmgr = $dbmgr;
}
function retrieveContent($contentName, $contentType) {
$sql = "SELECT * FROM content";
if ($contentType == 'ID') {
$sql = "SELECT * FROM content WHERE content_id = " . $contentName;
}
else {
$sql = "SELECT * FROM content WHERE content_type = '" . $contentName . "'";
}
if ( !$results ) {
echo ( "Could not return results" );
$results = "";
}
$results = $this->dbmgr->runQuery($sql);
return $results;
}
}
)



)


Bookmarks