Welcome, Guest. Please login or register.
Did you miss your activation email?
Oct. 12, 2008, 05:39:44 AM
47679 Posts in 10457 Topics by 5342 Members
Latest Member: vihuarar
News: Share your PRADO experience with other PRADOers by commenting on the QuickStart Tutorial.
 
The PRADO Community » Prado v3.x » General Discussion » Newbie Part II -TActiveRecord « previous next »
Pages: [1] Print
Author Topic: Newbie Part II -TActiveRecord  (Read 2016 times)
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« on: Feb. 17, 2007, 11:02:15 PM »

Thanks for those who helped me get up the learning curve of a "Hello world" program.   Hongliang's hint about using TMultiviews was a real epiphany for me.

 Now I have two more newbie questions. BTW- I am running 3.1a

Question 1 -

 I am trying to get TActiveRecord to work.  I have connected to my database using "raw' PDO connection "stuff" ala:

Code:
$db = new PDO('mysql:host=127.0.0.1;dbname=db1',
    'user', 'password');

  $query = "select * from users where last_name = 'smith' ".
           "order by last_name asc";
 
  print "query = " . $query . "<p />";

  $result = $db->query($query);
 
  $users = $result->fetchAll(PDO::FETCH_ASSOC);

foreach ($users as $user)
{
print($user['last_name'] . "<p />");
}

 I put this in my Home.php OnClick method and all worked swimmingly.

 Now I am trying to do it via TActiveRecord.  I have two questions about this.

In my Home.php I now have the following in my OnClick method:

Code:
$dsn = 'mysql:host=localhost;dbname=test';
$conn = new TDbConnection($dsn, 'user','password);
TActiveRecordManager::getInstance()->setDbConnection($conn);

$finder = UserRecord::finder();
 
//using position place holders
$finder->find('last_name = ?', array('smith'));

 And I created a UserRecord.php in protected/pages (is that where it is supposed to go?) following the documentation set at http://www.pradosoft.com/demos/quickstart/?page=Database.ActiveRecord:

Code:
class UserRecord extends TActiveRecord
{
    public $first_name;
    public $last_name;
   
    public static $_tablename='users'; //table name
   
    /**
     * @return TActiveRecord active record finder instance
     */
    public static function finder()
    {
        return self::getRecordFinder('UserRecord');
    }
}

 When I try to run this I get:

Fatal error: Class 'TDbConnection' not found in protected/pages/Home.php on line 76

 Line 76 is the line that closes my OnClick method.

Question 2 -
 My next question (assuming that the previous question is a quick fix) is that I notice that in that ActiveRecord tutorial that I linked to above, it was mentioned that one could put the db connection stuff in the application.xml.  But what it fails to state is once that is done, how does one "get to it".  I mean in my attempt above I am using:

Code:
$dsn = 'mysql:host=localhost;dbname=test';
$conn = new TDbConnection($dsn, 'user','password);
TActiveRecordManager::getInstance()->setDbConnection($conn);


.. to set the connection via $conn and the $dsn.  How do I reference the application.xml defined one in my code to get the finder?

 Thanks again in advance for any assistance that you can render. This has been most fun so far and I look forward to moving forward with a little help. 

« Last Edit: Feb. 17, 2007, 11:03:50 PM by dsobiera » Logged
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #1 on: Feb. 18, 2007, 12:58:05 AM »

Quote
Fatal error: Class 'TDbConnection' not found in protected/pages/Home.php on line 76"

 I got this to go away (after searching through the Prado site) by adding the following at the top of Home.php

Code:
Prado::using('System.Data.TDbConnection');
Prado::using('System.Data.ActiveRecord.*');

 However now I getting:

Fatal error: Class 'TActiveRecordEventParameter' not found in framework/Data/ActiveRecord/TActiveRecordGateway.php on line 369

« Last Edit: Feb. 18, 2007, 01:13:32 AM by dsobiera » Logged
flavio
Junior Member
**

Karma: 0
Offline Offline

Posts: 21


Functionless art is simply tolareted vandalism


View Profile
« Reply #2 on: Feb. 18, 2007, 01:51:30 AM »

look at quickstart example that comes with 3.1a, (Working with Databases -> Active Record)
Logged
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #3 on: Feb. 18, 2007, 03:28:32 AM »

look at quickstart example that comes with 3.1a, (Working with Databases -> Active Record)

 I'd be happy to if I could figure how one can do it. How in Hades do you get to the example to view it? 
Logged
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #4 on: Feb. 18, 2007, 03:38:32 AM »

look at quickstart example that comes with 3.1a, (Working with Databases -> Active Record)

 I'd be happy to if I could figure how one can do it. How in Hades do you get to the example to view it? 


 Okay, I moved the demos folder that came with 3.1a to a web "enabled" directory. Then I changed the $frameworkPath in quickstart's index.php to point to the prado framework on my setup.  I looked at Working with Databases-> Active Record and it doesn't appear to help me any more than the quickstart Working with Databases -> Active record on the Pradosoft site itself did.

 What am I missing here?  The quickstart example, NEVER mentions (that I saw) including those Prado::using for the ActiveRecord. I added those on my own.

 There are obviously pieces to this that I am not quite understanding.
Logged
jerrys
Junior Member
**

Karma: 0
Offline Offline

Posts: 11


View Profile
« Reply #5 on: Feb. 18, 2007, 03:14:24 PM »

Question 2 -
 My next question (assuming that the previous question is a quick fix) is that I notice that in that ActiveRecord tutorial that I linked to above, it was mentioned that one could put the db connection stuff in the application.xml.  But what it fails to state is once that is done, how does one "get to it".  I mean in my attempt above I am using:

Code:
$dsn = 'mysql:host=localhost;dbname=test';
$conn = new TDbConnection($dsn, 'user','password);
TActiveRecordManager::getInstance()->setDbConnection($conn);


.. to set the connection via $conn and the $dsn.  How do I reference the application.xml defined one in my code to get the finder?

If you put your connection data in your application.xml prado will initialize everything authomatically. To "get" to the finder notice that it's a static method of your UserRecord class so you can invoke it like this $finder=UserRecord::finder(). In the application.xml you can put also all those "using" clauses, if every page needs them, in a <paths> section. For example to make all you active records accessible to all pages do:
Code:
  <paths>
    <using namespace="Application.pages.DAO.*" />
  </paths>
Then put your ActiveRecords in a subfolder called DAO under pages/ (that's what the namespace declaration refers to). In each record you only have to do Prado::using('System.Data.ActiveRecord.TActiveRecord') to get to the ActiveRecord class definition that you are subclassing. On a general note in Prado everything lives inside a namespace, that's perhaps one of the first things to get used to.
Logged
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #6 on: Feb. 18, 2007, 05:38:54 PM »


If you put your connection data in your application.xml prado will initialize everything authomatically. To "get" to the finder notice that it's a static method of your UserRecord class so you can invoke it like this $finder=UserRecord::finder().

 Thanks for the reply Jerrys.

 But how does it map my UserRecord with THAT connection?  If I have three different databases used with 3 different ActiveRecord subclasses of mine, how does it know which class maps to which database?  I was expecting to see that in the module area but I didn't.

Quote
In the application.xml you can put also all those "using" clauses, if every page needs them, in a <paths> section. For example to make all you active records accessible to all pages do:
Code:
  <paths>
    <using namespace="Application.pages.DAO.*" />
  </paths>
Then put your ActiveRecords in a subfolder called DAO under pages/ (that's what the namespace declaration refers to). In each record you only have to do Prado::using('System.Data.ActiveRecord.TActiveRecord') to get to the ActiveRecord class definition that you are subclassing. On a general note in Prado everything lives inside a namespace, that's perhaps one of the first things to get used to.

 When I try to run (not quite yet using the module in application.xml for the database setup itself) .  I moved all the Prado::using into the application.xml file. So I don't have any more Prado::using directives in the php files and my application.xml file looks like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
  <application ID="test" >
<paths>
      <using namespace="System.Data.*"/>
          <using namespace="System.Data.ActiveRecord.TActiveRecord" />
  </paths>
  </application>

 But I am still getting:

Fatal error: Class 'TActiveRecordEventParameter' not found in framework/Data/ActiveRecord/TActiveRecordGateway.php on line 369

 This is annoying me because this seems like this should be a straight forward thing and it is not. I know I can be a simpleton and times but I didn't think I was this stupid Sad   Why can it not find TActiveRecordEventParameter?  Am I missing a namespace?
Logged
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #7 on: Feb. 18, 2007, 05:52:15 PM »

Here's my code for my entrie application (it's a small one). Can anyone tell me why after I submit the first page I get:

Fatal error: Class 'TActiveRecordEventParameter' not found in framework/Data/ActiveRecord/TActiveRecordGateway.php on line 369

application.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
  <application ID="test" >
<paths>
          <using namespace="System.Data.*"/>
            <using namespace="System.Data.ActiveRecord.TActiveRecord" />
  </paths>
  </application>

Home.page
Code:
<com:TForm>
  <com:TMultiView ID="MultiView" ActiveViewIndex="0">

    <com:TView ID="View1">

<center>
<table border="1">
<tr>
<td>Search by First Letter of Last Name:<br />
<com:TRadioButtonList ID="radiobuttonlist"
  RepeatLayout="Flow"
  RepeatDirection="Horizontal"
  RepeatColumns="7"/>
</td>
</tr>
<tr>
<td>
<com:TButton Text="User Search"
OnClick="buttonClicked" />
</td>
</tr>
</table>
</center>
    </com:TView>

    <com:TView ID="View2">

Results:<p />
You selected: <com:TLabel ID="results" ForeColor="red" />
    </com:TView>

  </com:TMultiView>

</com:TForm>

Home.php

Code:
<?php
 
class Home extends TPage
 
{
 
public function onLoad($param)
 
{
parent::onLoad($param);

if(!$this->IsPostBack)
{
$character 65;

$data = array();

for ($i=65$i<$character+26$i++)
{
$data[chr($i)] = chr($i);
}

$this->radiobuttonlist->DataSource=$data;
$this->radiobuttonlist->dataBind();

}
 
}
 

 
public function buttonClicked($sender$param)
 
{
 
$output  $this->collectSelectionResult($this->radiobuttonlist);
 

 
$selectedindex $this->radiobuttonlist->SelectedIndices[0];
 

 
$item $this->radiobuttonlist->Items[$selectedindex];
 

 
$letter $item->Value;
 

 
if ($this->MultiView->ActiveViewIndex == 0)
 
$this->MultiView->ActiveViewIndex 1;
 

 
$this->results->Text $output;

$dsn 'mysql:host=localhost;dbname=test'
$conn = new TDbConnection($dsn'user','password');

TActiveRecordManager::getInstance()->setDbConnection($conn);        
 
}
 

 

 
protected function collectSelectionResult($input)
{
$indices=$input->SelectedIndices;
$result='';
foreach($indices as $index)
{
$item=$input->Items[$index];
$result.="(Index: $index, Value: $item->Value, Text: $item->Text)";
}
if($result==='')
$output='Your selection is empty.';
else
$output='Your selection is: '.$result;

return $output;

}
 }
?>


UserRecord.php
Code:
<?php

class UserRecord extends TActiveRecord
{
    public 
$first_name//the column named "username" in the "users" table
    
public $last_name;
    
    public static 
$_tablename='users'//table name 
    
     
* @return TActiveRecord active record finder instance
    
public static function finder()
    {
        return 
self::getRecordFinder('UserRecord');
    }
}
?>



  I am completely stumped. Any hints to get this to work would be greatly appreciated. Smiley
Logged
aztech
Platinum Member
****

Karma: 34
Offline Offline

Posts: 693



View Profile WWW
« Reply #8 on: Feb. 18, 2007, 06:04:54 PM »

@dsobiera: Please, please, please... read Quick Start Tutorial first more carefull. Here you have explained, step by step everything what U need about ActiveRecord.
There U have written that table is recognized
  a) by name of active record class
  b) if name of your active record is different that your table in database, then U must set static $_tablename property of Active Record class.
Second, this what jerrys said about storing database in one directory is good, but (!) storing database stuff under pages directory IMHO is one big missunderstood.
Third, after studing your post I'm really confused if you read whole tutorial.

If you have 3 different databases configure 3 differend connection in application.xml. Then in your code you can use:
  $myActiveRecord = new MyActiveRecordClass(array(),$connection);
where $connection points to correct database connection.

I'm also confused about way how you want to use acitveRecord.
Lets say that we have tablename: "example_table" in our database, this table have two fields: id and myValue. Your active record file should look like below
//this is namespace (path) which means:
// System - go to framework base directory
// and follow /data/activeRecord parh
// wgere you have TActiveRecord.php file with TActiveRecord class
PRADO::using('System.Data.ActiveRecord.TActiveRecord');

class 
MyActiveRecordClass extends TActiveRecord {

  public 
$id;
  public 
$myValue;

  public static 
$_tablename 'example_table'// <-- now actice record knows table name :)
  
protected static $_populateAsObject;

  public static function 
finder() {
  
	
return 
self::getRecordFinder('MyActiveRecordClass'); // <-- important !!
  
}

}

now in every place in your code U can use


// I assume that $conn is bound
 
MyActiveRecordClass::getInstance()->setDbConnection($conn);
// an example which search for entries in table by primary key = 1
 
$recordFound MyActiveRecordClass::finder()->findByPk(1);

Note! Remember in file where you use MyActiveRecordClass to include namespace path
e.g
// this below means
// Application - path to main project directory where index.php is placed
// next follow this path: Common.DAO.ActiveRecord
// under found directory load MyActiveRecordClass from MyActiveRecordClass.php file
PRADO::using('Application.Common.DAO.ActiveRecord.MyActiveRecordClass');

Update:
1) I wrote that post when you have writing your own Smiley. Now I see that your read tutorial Smiley
2) Activate your connection $conn->active = true;
« Last Edit: Feb. 18, 2007, 06:15:41 PM by aztech » Logged

dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #9 on: Feb. 18, 2007, 09:23:59 PM »

@dsobiera: Please, please, please... read Quick Start Tutorial first more carefull.

 I have read it until I am blue in the face.  Although it does present a good description of TActiveRecord it does leave pieces as exercises to the reader.

Quote
There U have written that table is recognized
  a) by name of active record class
  b) if name of your active record is different that your table in database, then U must set static $_tablename property of Active Record class.
Second, this what jerrys said about storing database in one directory is good, but (!) storing database stuff under pages directory IMHO is one big missunderstood.
Third, after studing your post I'm really confused if you read whole tutorial.

 Of course I did.  Now did I miss comprehending something it? No doubt as my forehead is sore from hitting it on my desk Smiley .  But reading it 50 times without some guidance isn't going to assist me here.

Quote
If you have 3 different databases configure 3 differend connection in application.xml. Then in your code you can use:
  $myActiveRecord = new MyActiveRecordClass(array(),$connection);
where $connection points to correct database connection.

 If I am setting up my databases from the application.xml, where does it set the connection?

Quote
I'm also confused about way how you want to use acitveRecord.

 How should I be looking to use ActiveRecord? I'm open to that ActiveRecord isn't doing what I am thinking it is doing.  But, respectfully, telling a new user to RTFM isn't going to help new developers into this framework. Especially when he did RTFM.


Quote
Lets say that we have tablename: "example_table" in our database, this table have two fields: id and myValue. Your active record file should look like below

//this is namespace (path) which means:
// System - go to framework base directory
// and follow /data/activeRecord parh
// wgere you have TActiveRecord.php file with TActiveRecord class
PRADO::using('System.Data.ActiveRecord.TActiveRecord');

 Tried that. First PRADO in all capital letters doesn't work for me. I needed to capitalize the first letter followed by lowercase.

Prado::using('System.Data.ActiveRecord.TActiveRecord');

Quote
class MyActiveRecordClass extends TActiveRecord {

  public $id;
  public $myValue;

  public static $_tablename = 'example_table'; // <-- now actice record knows table name Smiley
  protected static $_populateAsObject;

  public static function finder() {
     return self::getRecordFinder('MyActiveRecordClass'); // <-- important !!
  }

}


 Other than the _populateAsObject, isn't this what I have?  BTW where did you find the _populateAsObject in that tutorial?

Quote
// I assume that $conn is bound
 MyActiveRecordClass::getInstance()->setDbConnection($conn);

 HOW is conn bound?  If I don't use the [module] area in my application.xml file, I understand it is done with:

Code:
$dsn = 'mysql:host=localhost;dbname=test';
$conn = new TDbConnection($dsn, 'user','password');

 When I put the stuff in application.xml, do I still need the dsn and conn in my code?

Quote
// an example which search for entries in table by primary key = 1
 $recordFound = MyActiveRecordClass::finder()->findByPk(1);

 I cannot even get that far. The line:

      TActiveRecordManager::getInstance()->setDbConnection($conn);

in my code throws that not foud error I wrote of earlier.

Quote
2) Activate your connection $conn->active = true;

 Activate WHERE?  Could you (or someone) please please post a COMPLETE working trivial app that uses ActiveRecord.  I am getting a lot of people trying to help but we are all using code segments.  Could I actually get  hold of something COMPLETE that WORKS so that I may learn from that? The tutorial doesn't quite do that for me.

 I wish they had something like the radio button documentation that allows one to look at a functioning app and then the underlying code.
« Last Edit: Feb. 18, 2007, 09:30:17 PM by dsobiera » Logged
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #10 on: Feb. 18, 2007, 10:49:21 PM »

Somebody wiser than me can explain this, but I got it to work.

The error:

Fatal error: Class 'TActiveRecordEventParameter' not found in framework/Data/ActiveRecord/TActiveRecordGateway.php on line 369


 I started digging around in the Prado framewok itself.  In my application.xml I have the following:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<application ID="test" >
<paths>
    <using namespace="System.Data.*"/>
        <using namespace="System.Data.ActiveRecord.TActiveRecord" />
  </paths>
</application>

 So then I looked at what was in framework/Data/ActiveRecord/TActiveRecord.php

Line 13 has this line:

Code:
Prado::using('System.Data.ActiveRecord.TActiveRecordManager');

 So then I looked at framework/Data/ActiveRecord/TActiveRecordManager.php and saw that at the very end of the file, the class TActiveRecordEventParameter was being defined. YAY!!!!  Nothing is in the class but it IS being defined. so wha tdo you mean you can't find it (the error)?   So I started wondering why the error?

Back to the error I was getting:

Fatal error: Class 'TActiveRecordEventParameter' not found in framework/Data/ActiveRecord/TActiveRecordGateway.php on line 369


 What I noticed in that file that DID define TActiveRecordParameter is that at the TOP of the file the following was there:

Code:
Prado::using('System.Data.ActiveRecord.TActiveRecordGateway');

Ah ha!  The file that the error complains about. So then I look in TActiveRecordGateway and notice the following on line 318:

Code:
class TActiveRecordGatewayEventParameter extends TActiveRecordEventParameter

 Ah ha! There is something that is extending that TActiveRecordEventParameter.

 So what I did is go into TActiveRecordGateway and move the following to AFTER TActiveRecordEventParameter is defined. So the bottom of that file looks like:

Code:
class TActiveRecordEventParameter extends TEventParameter
{

}

Prado::using('System.Data.ActiveRecord.TActiveRecordGateway');

 Once I moved the TActiveRecordGateway to after the area defining TActiveREcordEventParameter all works fine now with ActiveRecords.

 I still need to learn how to use things from within application.xml, but this fixed the problem I was having.  I pulled data from my database with no problems now. YAY!!!

 I'm surprised no one else has had this problem that are using 3.1a and ActiveRecords.

 This was a caveman fix.  If any has a better solution to this please share Smiley
 
Logged
wei
PRADO v3.x Developer
Diamond Member
*****

Karma: 65
Offline Offline

Posts: 2872



View Profile
« Reply #11 on: Feb. 18, 2007, 10:57:43 PM »

Apologies if the docs on the active records are a little terse, it does assume some understanding of other topics first (hence, it was placed lower down in the chapters). I will try to write a tutorial soon (e.g. lots of nitty details in setting it up and possible errors message may be faced).

If you still have trouble getting the Active Record going, here is a simple setup. (Try to use the latest code, as there were many changes since 3.1a)

From the Helloworld example (Home.php), the bare minimum active record setup
Code:
Prado::using('System.Data.ActiveRecord.TActiveRecord');

class MyActiveRecordClass extends TActiveRecord
{
public static $_tablename='address';

public $username;
public $phone;

//see alternative below
private static $_db;
public function getDbConnection()
{
if(self::$_db===null)
{
//sqlite db is file based
self::$_db = new TDbConnection('sqlite:./protected/sqlite.db');
}
return self::$_db;
}
}

/** alternative connection setting */
//TActiveRecordManager::getInstance()->setDbConnection(
// new TDbConnection('sqlite:./protected/sqlite.db'));

class Home extends TPage
{
public function onLoad($param)
{
$finder = new MyActiveRecordClass();
var_dump($finder->findAll());
}

public function buttonClicked($sender,$param)
{
$sender->Text="Hello World!";
}
}
?>


Hope that helps.

PS. Try the latest code, many minor changes since 3.1a Wink, such as the problem with the "blah blah.. missing class".
« Last Edit: Feb. 18, 2007, 10:59:16 PM by wei » Logged
dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #12 on: Feb. 18, 2007, 11:14:42 PM »

Thanks wei.  I will go over that code that you supplied.

 I will also try the latest Prado snapshot and see if the "caveman" namespace fix isn't necessary.  I'm not sure if that really fixed it or if it was coincidental.  Either way, I'm happy!
Logged
aztech
Platinum Member
****

Karma: 34
Offline Offline

Posts: 693



View Profile WWW
« Reply #13 on: Feb. 18, 2007, 11:56:39 PM »

Code example from application.xml
Code:
<!-- Data modules -->
<!-- config of db module -->
    <module id="db" class="System.Data.TDataSourceConfig">
      <database
        ConnectionString="mysql:host=localhost;dbname=dbname"
        Username="user"
        Password="pass" />
    </module>
<!-- use conigured db connection for active record -->
    <module
      id="activeRecord"
      ConnectionID="db"
      class="System.Data.ActiveRecord.TActiveRecordConfig"
      EnableCache="false"
    />
<!-- use this connection also for sql map stuff 
 it's for future usage :)
-->
    <module
      id="sqlmap"
      ConnectionID="db"
      class="System.Data.SqlMap.TSqlMapConfig"
      EnableCache="false"
      ConfigFile="Application.Data.SqlMaps.MyConfigFile"
    />

Probably if you place this line into application xml, it solves your all problems with active records
Code:
<paths>
  <using namespace="System.Data.ActiveRecord.*"/>
</paths>

If you set your connection in application.xml U can access db connection this way
// parameter of getModule method is a module name
// in this case getModule('db') returns TDataSourceConfig
  
$conn PRADO::getApplication()->getModule('db')->getDbConnection();
  
$conn->setActive(true);
  
// or 
  
$conn->active true;

or when U configured default connection for ActiveRecord (as I did above)

$conn MyActiveRecordClass::finder()->getDbConncection();
$conn->active true;

I hope this helps you.

P.S. No offence, but when I was reading your posts they look just a little bit chaotic.
Second as I wrote at the end of my last post,
Quote
Update:
1) I wrote that post when you have writing your own Smiley. Now I see that your read tutorial Smiley
Logged

dsobiera
Junior Member
**

Karma: 0
Offline Offline

Posts: 16


View Profile
« Reply #14 on: Feb. 19, 2007, 12:39:59 AM »

P.S. No offence, but when I was reading your posts they look just a little bit chaotic.

 I was getting a bit frustrated as I was indeed reading every forum post AND tutorial area that I could find. Several hours worth actually.  So I WAS reading. When you suggested I wasn't....well that frustration surfaced a bit.

 And yes, I realize that my problem turned into several different problems.  So the chaotic nature of my post wasn't intended. The one problem seems systemic to the 3.1a version. So adding the ActiveRecord namespace would NOT have fixed it as I was already adding it.

 The second problem, both you and Wei are supplying code for to which I greatly appreciate.

 Thanks!  I will most definitely be looking over your and Wei's code for some enlightenment Smiley.
Logged
Pages: [1] Print 
« previous next »
Jump to: