I have problem with Transaction

I got error:

PHP Error


Indirect modification of overloaded property Transaction::$t_amount has no effect


00115:                         $command->bindParam(":u_balance",$model->t_amount,PDO::PARAM_INT);

I don’t know why, last time I still update

my sql command:

$sql1 = "UPDATE tt_users SET u_balance=u_balance - :u_balance where u_id=:sender";

How can i fix it ?

please help me

Try not setting a data type.


$cmd->bindParam(':cond', $value);


thanks, but still not working

help me …:(

I solved it , I used updatebyPK and implement with finbyPK

nice framework

I got the error too…

But the code works fine under my dev computer.

Poped up this error in server machine.

I guess the problem is PHP version

Mine is 5.2.9

Server’s is 5.3.1

Maybe? Maybe should waiting Yii 1.2.* , otherwise just use a lower version php ?

When I change the PHP version backto 5.2.9 on server.

It works well now …

I saw some pages said that to replace method ‘__get()’ with ‘&__get()’ would be OK.

not quite sure about that.

I tried another way to solve above problem under PHP5.3

File location : framework/db/CDbCommand.php

line 147

public function bindParam($name,&$value, $dataType=null, $length=null)

changed to

public function bindParam($name,$value, $dataType=null, $length=null)

I am a newbie to PHP, So I am not sure this is OK but now it works fine

Maybe there will be some potential harm… ??

wish qiang will give this thread a glance and give us a answer…

1 Like