can I create a db transaciton that has both active record and database access objects queries?
for example, below, notice how I use both active record and database access objects to perform mysql queries.
I used both active Record save() and also createCommand()->execute()…
How do I do that?
// find and save are two steps which may be intervened by another request
// we therefore use a transaction to ensure consistency and integrity
$post->title='new post title';