PHP - Get affected rows in ADODB

后端 未结 2 679
囚心锁ツ
囚心锁ツ 2021-01-22 01:30

I using ADODB to create a connection to my database. I update the data in my database, there is no error. The problem is that I can\'t get the number of affected rows by A

2条回答
  •  迷失自我
    2021-01-22 01:50

    just for mark.

    your code:

    echo $conn->Affected_Rows()
    

    is ADODB SDK methods: http://adodb.org/dokuwiki/doku.php?id=v5:reference:connection:affected_rows

    NOT a native COM("ADODB.connection") method.

    but i have same problem because this method return "variant Object" so i can't get the value.

    i fixed this by edit SDK source file : adodb5/drivers/adodb-ado5.inc.php #44 line:

    $this->_affectedRows =new VARIANT;
    

    to:

    $this->_affectedRows = null;
    

    then Affected_Rows() method can return a real number for me.

提交回复
热议问题