| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function getNextId() |
||
| 15 | { |
||
| 16 | $table = $this->getEntity()->getTableName(); |
||
| 17 | |||
| 18 | $sql = "SELECT MAX(USER_CONN_ID) USER_CONN_ID FROM $table"; |
||
| 19 | |||
| 20 | $this->getDriver()->getDb()->execute($sql); |
||
| 21 | $rowset = $this->getDriver()->getDb()->getArrayResult(); |
||
| 22 | $row = array_shift($rowset); |
||
| 23 | |||
| 24 | return is_null($row["USER_CONN_ID"]) ? 1 : (integer) $row["USER_CONN_ID"] + 1; |
||
| 25 | } |
||
| 26 | } |