From 7ea61ba9701a04bc593d7c5960c5135ce39805a8 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 3 Jan 2007 11:31:18 +0000 Subject: quote the criteria string in ActiveRecord. --- demos/quickstart/protected/pages/Database/ActiveRecord.page | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'demos/quickstart/protected/pages/Database') diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page index 017b8d45..e3da53c0 100644 --- a/demos/quickstart/protected/pages/Database/ActiveRecord.page +++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page @@ -74,7 +74,7 @@ class UserRecord extends TActiveRecord public $username; //the column named "username" in the "users" table public $email; - private static $_tablename='users'; //table name + public static $_tablename='users'; //table name /** * @return TActiveRecord active record finder instance @@ -88,7 +88,7 @@ class UserRecord extends TActiveRecord

Each property of the UserRecord class must correspond to a column with the same name in the "users" table. The static class variable - $_tablename is optional when the class name is the same as + $_tablename (must be public) is optional when the class name is the same as the table name in the database, otherwise $_tablename must specify the table name that corresponds to your Active Record class.

-- cgit v1.2.3