Hi. I am trying to use ActiveRecord CRUD in yii2.
Have: - mySQL database connectivity, (user has all permissions),
- a table with a varchar field called "email", - an ActiveRecord Model file for the correct table (*test*) with a - function in it with code like the lines below.
Am following: AR examples in the guide for yii 2.0 (http://www.yiiframework.com/doc-2.0/guide-db-active-record.html#inserting-updating-data):
// update an existing row of data
$test = Test::findOne(123);
$test->email = ‘firstname.lastname@example.org’;
When I save I only get a new row, not with the "email" data above.
I can do it using the DAO calls, but not AR. Any ideas? Any way to actually see the SQL code for the update?