head.daveops.net

Snippets for yer computer needs

PHP - PDO

PHP - PDO

@php

simple query

 <?php
 $sql = "SELECT max(id) FROM table";
 $sth = $DB->prepare($sql);
 $sth->execute();
 $max_id= $sth->fetchColumn();
 ?>