@@ 281-291 (lines=11) @@ | ||
278 | * @access public |
|
279 | * @return int |
|
280 | */ |
|
281 | public function GetLastId() |
|
282 | { |
|
283 | $sql = "select id from $this->sTblLog order by id desc"; |
|
284 | $rs = $this->oDb->SelectLimit($sql, 1); |
|
285 | if ($rs->EOF) |
|
286 | $id = 0; |
|
287 | else |
|
288 | $id = $rs->fields['id']; |
|
289 | $this->iLastId = $id; |
|
290 | return $id; |
|
291 | } // end of func GetLastId |
|
292 | ||
293 | ||
294 | /** |
|
@@ 299-313 (lines=15) @@ | ||
296 | * @access public |
|
297 | * @return int |
|
298 | */ |
|
299 | public function GetLastDoneId() |
|
300 | { |
|
301 | $sql = "select id from $this->sTblLog where done=1 order by id desc"; |
|
302 | $rs = $this->oDb->SelectLimit($sql, 1); |
|
303 | if ($rs->EOF) |
|
304 | { |
|
305 | $id = 0; |
|
306 | } |
|
307 | else |
|
308 | { |
|
309 | $id = $rs->fields['id']; |
|
310 | } |
|
311 | $this->iLastDoneId = $id; |
|
312 | return $id; |
|
313 | } // end of func GetLastDoneId |
|
314 | ||
315 | ||
316 | /** |
@@ 234-249 (lines=16) @@ | ||
231 | * |
|
232 | * @return int |
|
233 | */ |
|
234 | public function getLastId() |
|
235 | { |
|
236 | $db = $this->getDb(); |
|
237 | ||
238 | $sql = "SELECT id FROM $this->logTable ORDER BY id DESC"; |
|
239 | $rs = $db->SelectLimit($sql, 1); |
|
240 | ||
241 | if ($rs->EOF) { |
|
242 | $id = -1; |
|
243 | } else { |
|
244 | $id = $rs->fields['id']; |
|
245 | } |
|
246 | ||
247 | $this->lastId = $id; |
|
248 | return $id; |
|
249 | } |
|
250 | ||
251 | ||
252 | /** |
|
@@ 257-272 (lines=16) @@ | ||
254 | * |
|
255 | * @return int |
|
256 | */ |
|
257 | public function getLastIdDone() |
|
258 | { |
|
259 | $db = $this->getDb(); |
|
260 | ||
261 | $sql = "SELECT id FROM $this->logTable WHERE done=1 ORDER BY id DESC"; |
|
262 | $rs = $db->SelectLimit($sql, 1); |
|
263 | ||
264 | if ($rs->EOF) { |
|
265 | $id = -1; |
|
266 | } else { |
|
267 | $id = $rs->fields['id']; |
|
268 | } |
|
269 | ||
270 | $this->lastIdDone = $id; |
|
271 | return $id; |
|
272 | } |
|
273 | ||
274 | ||
275 | /** |