How to return max(id) in pdo
问题 I am trying to return the last id and increment it to put in the value attribute. I can make it work with old mysql but not with the PDO. I am learning (I think) PDO but it is not making sense. Below is the code. <td><label for="invNum"></label>Invoice</td> <?php $stmt = $dbconn->prepare("SELECT max(invId) FROM invoices"); $stmt->execute(); $invNum = $stmt->fetch(); /* mysql_select_db("customers", $dbconn); $result = mysql_query("SELECT max(invId) FROM invoices"); if (!$result) { die('Could