I'm using MySQL 3.22.32 and php 4.1.1. I'd like to get the id number back after an insert query.
here's my field: id int(10) UNSIGNED NOT NULL auto_increment
Code:
SQLStr = "INSERT into ref_journals (authors, title, journal) VALUES ('" . $authors . "', '" . $title . "', '" . $journal);";
$result = mysql_query($SQLStr)
The result (after a successful insert):
echo mysql_insert_id(); and
$query = "SELECT LAST_INSERT_ID()";
$updateID = mysql_query($query)
both return 0
what am I doing wrong?
thanks,
--Brian