After adding this code to a non-vB page on my site, I started getting about 20 of these errors:
Quote:
Link-ID == false, connect failed
mysql error:
mysql error number: 0
|
from random pages in my forum everyday. Previously, I got vBulletin errors at the rate of maybe a couple a week. Was it coincidence, or could this code be causing the problems?
PHP Code:
<?php
error_reporting(0);
$db = mysql_connect("********", "********", "********");
mysql_select_db("********",$db);
$numbersmembers=mysql_fetch_array(mysql_query('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user'));
$numbermembers=number_format($numbersmembers['users']);
$countposts=mysql_fetch_array(mysql_query('SELECT COUNT(*) AS posts FROM post'));
$totalposts=number_format($countposts['posts']);
$countthreads=mysql_fetch_array(mysql_query('SELECT COUNT(*) AS threads FROM thread'));
$totalthreads=number_format($countthreads['threads']);
echo "$totalposts $totalthreads $numbermembers";
$thread_sql = mysql_query("SELECT threadid,title,lastposter,forumid FROM thread WHERE visible=1 AND open=1 AND (forumid=2 OR forumid=23 OR forumid=27 OR forumid=18 OR forumid=3 OR forumid=17 OR forumid=26 OR forumid=19 OR forumid=30 OR forumid=20) ORDER BY lastpost DESC LIMIT 10");
while($thread_get=mysql_fetch_array($thread_sql))
{
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid DESC");
$getp=mysql_fetch_array($psql);
$pid = $getp['postid'];
$title = $thread_get['title'];
$title = substr($title,0,60);
$forumid = $thread_get['forumid'];
$forumnames = mysql_fetch_array(mysql_query("SELECT title FROM forum WHERE forumid=$forumid"));
$forumname = $forumnames['title'];
echo "$pid $pid $title $forumid $forumname";
}
?>
Thanks.