@@ 159-169 (lines=11) @@ | ||
156 | * @param array $param |
|
157 | * @return int |
|
158 | */ |
|
159 | function executeAndGetInsertedId($dbdataset, $sql, $param) |
|
160 | { |
|
161 | $id = parent::executeAndGetInsertedId($dbdataset, $sql, $param); |
|
162 | $it = $dbdataset->getIterator("select @@identity id"); |
|
163 | if ($it->hasNext()) { |
|
164 | $sr = $it->moveNext(); |
|
165 | $id = $sr->getField("id"); |
|
166 | } |
|
167 | ||
168 | return $id; |
|
169 | } |
|
170 | } |
|
171 |
@@ 176-186 (lines=11) @@ | ||
173 | * @param array $param |
|
174 | * @return int |
|
175 | */ |
|
176 | function executeAndGetInsertedId($dbdataset, $sql, $param) |
|
177 | { |
|
178 | $id = parent::executeAndGetInsertedId($dbdataset, $sql, $param); |
|
179 | $it = $dbdataset->getIterator("select LAST_INSERT_ID() id"); |
|
180 | if ($it->hasNext()) { |
|
181 | $sr = $it->moveNext(); |
|
182 | $id = $sr->getField("id"); |
|
183 | } |
|
184 | ||
185 | return $id; |
|
186 | } |
|
187 | } |
|
188 |