Notifications
Clear all

[3.4.2] dbinsertid function returns 0

2 Posts
2 Users
0 Reactions
2,381 Views
(@tracer)
Posts: 5
Active Member
Topic starter
 

eFiction version: 3.4.2
Modifications: SMF bridge, UTF-8 support, tinyMCE 3

Problem:
dbinsertid() always returns 0.

Solution:
I've replaced old code in mysql_functions.php

function dbinsertid($tablename = 0) {
return mysql_insert_id( );
}

with this:

function dbinsertid($tablename = 0) {
global $dbconnect;
return mysql_insert_id($dbconnect);
}

and now it works fine.


 
Posted : 02/05/2008 2:33 am
(@tammy)
Posts: 2577
Member Moderator
 

You shouldn't need the connection information unless something's disconnected/replaced your mysql connection.  I think it's probably something with your server's setup.


 
Posted : 07/05/2008 1:24 am
Share: