i am simply trying to find out the most recent (or last) id# that was last inserted into a MS Access database using odbc calls in PHP 4.x. with MySQL, I could use the function:
$id = mysql_insert_id();
however, i have not found such a function using the odbc functions. i was trying to do this in a roundabout way:
$result = odbc_exec($connect, "SELECT id FROM table");
$id = odbc_num_rows ($result);
odbc_fetch_into($result, $id, $curr);
$id = $curr[0];
however, this doesnt work. the problem is that odbc_num_rows function returns -1 to $id. why??, i have no idea. has anyone ever done this before? please email a response as well as posting... thanks
-scott