FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » SQL Error: Unique key violated for forum_read and forum_notify
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: SQL Error: Unique key violated for forum_read and forum_notify [message #27872 is a reply to message #27842] Thu, 29 September 2005 00:48 Go to previous message
awadallah is currently offline  awadallah   United States
Messages: 11
Registered: September 2005
Location: Palo Alto, CA
Karma:
Junior Member


ok, for now, I just changed the db_li function to be as listed below, not clean, but gets the job done till hosting provider figures out why mysql keeps returning 2000 for dupe key.

essentially just added "|| mysql_errno(fud_sql_lnk) == 2000" to the 2nd if condition.

function db_li($q, &$ef, $li=0)
{
$r = mysql_query($q, fud_sql_lnk);
if ($r) {
return ($li ? mysql_insert_id(fud_sql_lnk) : $r);
}

/* duplicate key */
if (mysql_errno(fud_sql_lnk) == 1062 || mysql_errno(fud_sql_lnk) == 2000 ) {
$ef = ltrim(strrchr(mysql_error(fud_sql_lnk), ' '));
return null;
} else {
die(fud_sql_error_handler($q, mysql_error(fud_sql_lnk), mysql_errno(fud_sql_lnk), get_version()));
}
}

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: V2.7.0RC1 - thread not displayed in forum list or navigator
Next Topic: locking/unlocking files crashed the server...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 03:31:16 GMT 2024

Total time taken to generate the page: 0.04041 seconds