Model - Auto Increment Field

Hi everyone newbie here

Im just wondering how am I going to Add AutoIncrement Field in my model

like for Example

$newRecord = PensionRecord::model();

echo $newRecord->id; <- the result of tis is empty… :mellow:

Im just wondering how can I do something like this

$newRecord = PensionRecord::model();

echo $newRecord->id; //will result to 123456789 or something like 5465a4sd1a3a

Hi hellsing357,

I believe you need to save your model first, then you can echo a valid id.

HTH,

rash*