forked from extern/egroupware
Bugfix: RowLock was not working with MySQL. ignore is a reserved word and could be empty. See as well fix on mysql driver for getOne with LIMIT and FOR UPDATE
This commit is contained in:
parent
9b4814ba81
commit
0f476f3e98
@ -59,10 +59,15 @@ class ADODB_mysqlt extends ADODB_mysql {
|
||||
return true;
|
||||
}
|
||||
|
||||
function RowLock($tables,$where,$flds='1 as ignore')
|
||||
function RowLock($tables,$where,$flds='1 as ignored')
|
||||
{
|
||||
if ($this->transCnt==0) $this->BeginTrans();
|
||||
return $this->GetOne("select $flds from $tables where $where for update");
|
||||
if (empty($where)) {
|
||||
$qry = "select $flds from $tables for update";
|
||||
} else {
|
||||
$qry = "select $flds from $tables where $where for update";
|
||||
}
|
||||
return $this->GetOne($qry);
|
||||
}
|
||||
|
||||
}
|
||||
@ -133,4 +138,4 @@ class ADORecordSet_ext_mysqlt extends ADORecordSet_mysqlt {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user