findByAttributes misbehavior



SELECT * FROM `Account` WHERE `Account`.`name`=:yp0 LIMIT 1

I confirmed the existense of $username. It seems impossible to debug without touching CActiveRecord.

Any suggestions, please?

Ticket created.

In your db connection config, you can set ‘enableParamLogging’=>true to turn on parameter logging.

2009/08/14 20:59:04 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `Account` WHERE `Account`.`name`=:yp0 LIMIT 1. Bind with parameter :yp0='pestaa'


Please forgive my stupidity, I was in the misbelief that the generated SQL that was sent to firebug was also sent to the database.

I see my mistake now. Sorry for any inconvenience.


is i get model with patient_id equal to $_REQUEST[‘id’] ???


You can also use FindByPK if id is your primary key