Exemplo n.º 1
0
 /**
  * returns the maximum primary key value
  *
  * @return integer
  */
 public final function getMaxIdentifier()
 {
     $sql = "SELECT MAX(" . $this->getIdentifier() . ") FROM " . $this->getTableName();
     $stmt = $this->conn->getDBH()->query($sql);
     $data = $stmt->fetch(PDO::FETCH_NUM);
     return isset($data[0]) ? $data[0] : 1;
 }