Thanks GJ for the MySQL defaults.
In v5.11 - adodb.inc.php:
function RowLock($table,$where,$col='1 as adodbignore')
was in v5.10
function RowLock($table,$where,$col='1 as ignore')
Now analysing the differences between v5.11 and v5.10, we find that a new
class variable called
var $bulkBind = false; // enable 2D Execute array
has been newly introduced in v5.11 of adodb.inc.php in the class
ADOConnection
This variable is used as an additional check in v5.11 at line 956:
$array_2d = $this->bulkBind && is_array($element0) &&
!is_object(reset($element0));
The Last Insert ID is essentially an SQL statement in ADODB and hence the
above may something to do with it.
Regards,
Ap.Muthu
> hi muthu,
>
> if you read the comments of fucntion Insert_ID() in file
> adodb.in.php
>
> it writes
> /**
> * @param $table string name of the table, not needed by all
> databases (eg. mysql), default ''
> * @param $column string name of the column, not needed by all
> databases (eg. mysql), default ''
> * @return the last inserted ID. Not all databases support this.
> */
>
> gj.
>
>
>
> On 2010-09-29 11:02.PD, Ap.Muthu wrote:
>> The current ADOdb library is v5.11 on Care2x SVN trunk.
>> It was v5.10 till about 2 to 3 weeks ago.
>>
>> When a record is inserted into a table, we use ADOdb's method
>> $db->Insert_ID() to get us the last inserted ID where $db is the ADOdb
>> connection object.
>> The definition of the said method is in classes/adodb/adodb.inc.php files
>> and is used within ADOdb in two files:-
>> adodb-csvlib.inc.php - Line 44: $sql .= ','.$conn->Insert_ID();
>> adodb-perf.inc.php (for logging) - Line 107: $conn->lastInsID =
>> @$conn->Insert_ID();
>>
>> The specific MySQL driver we are using here is
>> /calsses/adodb/drivers/adodb-mysq.inc.php
>> The said driver has a class "mysql" that extends the base cass
>> "ADOConnection"
>> It has the class variable: var $hasInsertID = true;
>> It also has a class method: _insertid()
>> This method returns the last insert id and may possibly be for private
>> use.
>>
>> The default class variables values in the base class ADOConnection are:
>> var $lastInsID = false;
>> var $hasInsertID = false; /// supports autoincrement ID?
>> The latter is however overridden by a re-assignment in the mysql class.
>>
>> The class method ADOConnection::Insert_ID() is:
>>
>> function Insert_ID($table='',$column='')
>> {
>> if ($this->_logsql&& $this->lastInsID) return $this->lastInsID;
>> if ($this->hasInsertID) return $this->_insertid($table,$column);
>> if ($this->debug) {
>> ADOConnection::outp( '<p>Insert_ID error</p>');
>> adodb_backtrace();
>> }
>> return false;
>> }
>>
>> > From the above it is clear that for the _insertid() to work, it should
>> > have the table name and column name provided otherwise we have to check
>> > out what defaults it will take.
>>
>>
>> Regards,
>> Ap.Muthu
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>>
>>
>> _______________________________________________
>> Care2002-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/care2002-developers
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Care2002-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/care2002-developers
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Care2002-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/care2002-developers