Page 1 of 1

SELECT MAX(id) FROM

Posted: Wed Apr 05, 2006 12:10 pm
by sirTemplar
how do i do this. i want

$new_id =

the result of this query

$query = "SELECT MAX(id) FROM mytable";

+ 1


thanks

Posted: Wed Apr 05, 2006 12:27 pm
by feyd
  1. perform the query
  2. fetch the resultant column
  3. add one.

Posted: Wed Apr 05, 2006 2:35 pm
by sirTemplar
thanks.