Exception in ADOdb

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Exception in ADOdb

Post by Luke »

In the ADOdb docs, it says that trying to save an active record like so should throw an error, so how come this doesn't work? Am I doing this right?

Code: Select all

try{
					class Article extends ADOdb_Active_Record{}
					$article = new Article();
					$article->title = $request->title;
					$article->save();
				} catch(Exception $e) {
					die( 'ERROR' );
				}
Post Reply