Jump to content

[SOLVED] MySQL in PHP


947740

Recommended Posts

Check out this comment on the link I posted: http://us.php.net/manual/en/function.mysql-insert-id.php#83550

 

They show this example:

<?php
function get_current_insert_id($table)
{
    $q = "SELECT LAST_INSERT_ID() FROM $table";
    return mysql_num_rows(mysql_query($q)) + 1;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/163254-solved-mysql-in-php/#findComment-861341
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.