Hello guys! I am fairy new to yii. So, i have a CActiveForm for bidding on some products. Say i have one product that is named package3 and i am receiving bids for it. I want every bid for that package to be higher than the last made. How can i do that?
Can you be more specific about the customValidation function?
How can i get the highest bid from the database?
what i have in mind is something like:
function customValidation()
{
//get all the records of the same packageID
//find the highest bid from these records
//compare highest bid with $this->bid
//return error etc
}
but i am not sure how to make the first two parts of the function. i have tried a lot of things but nothing worked…