Answer the question
In order to leave comments, you need to log in
Why did ActiveRecord access stop working in Yii?
I make 2 requests.
Yii::app()->db->createCommand()->select('*')->from('{{news}}')->queryRow();
News::model()->find();
Answer the question
In order to leave comments, you need to log in
I apologize for the delay in reply.
The problem was very interesting. I could not find out 100% what it was, because when I sent a request to the hoster, he corrected the error. But the bottom line was that the space allocated for the database ended or something like that.
I assume that the situation is as follows. createCommand worked because it loaded the request less into the muscle. And the automatic generation of the request with the ORM no longer pulled it.
The code of the News class should be looked at, most likely there is a problem in it.
Do you have any database schema cached?
If yes, try resetting the cache.
What about the tableName() method in the News model? Usually braces are used when table_prefix comes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question