@@ 146-156 (lines=11) @@ | ||
143 | * @param array $param |
|
144 | * @return int |
|
145 | */ |
|
146 | public function executeAndGetInsertedId(DbDriverInterface $dbdataset, $sql, $param) |
|
147 | { |
|
148 | $insertedId = parent::executeAndGetInsertedId($dbdataset, $sql, $param); |
|
149 | $iterator = $dbdataset->getIterator("select @@identity id"); |
|
150 | if ($iterator->hasNext()) { |
|
151 | $singleRow = $iterator->moveNext(); |
|
152 | $insertedId = $singleRow->get("id"); |
|
153 | } |
|
154 | ||
155 | return $insertedId; |
|
156 | } |
|
157 | ||
158 | /** |
|
159 | * @param $sql |
@@ 147-157 (lines=11) @@ | ||
144 | * @param array $param |
|
145 | * @return int |
|
146 | */ |
|
147 | public function executeAndGetInsertedId(DbDriverInterface $dbdataset, $sql, $param) |
|
148 | { |
|
149 | $returnedId = parent::executeAndGetInsertedId($dbdataset, $sql, $param); |
|
150 | $iterator = $dbdataset->getIterator("select LAST_INSERT_ID() id"); |
|
151 | if ($iterator->hasNext()) { |
|
152 | $singleRow = $iterator->moveNext(); |
|
153 | $returnedId = $singleRow->get("id"); |
|
154 | } |
|
155 | ||
156 | return $returnedId; |
|
157 | } |
|
158 | ||
159 | public function hasForUpdate() |
|
160 | { |