Stumbled accross this nasty little error on a client’s installation of OsCommerce. The problem occurs when a new user is signing up, so this can be a real show stopper and cost sales!
Anyway thankfully I quickly found the solution and the fix is pretty quick and simple
catalog/includes/functions/database.php. Find the line relating to tep_db_insert_id and change it to:
function tep_db_insert_id( $link = 'db_link') {
global $$link;
return mysql_insert_id($$link);
}
By the looks of the solution, perhaps problem occurs because of a non persistant database connection, or other subsequent queries having run.
