News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

fix user message count

Started by Fatih!, February 13, 2006, 03:19:49 PM

Previous topic - Next topic

Fatih!

hi,
i want to fix user message count but i can't.
following code run localhost sucessfully but on server it's not running.
no error and nothing happened.

i is max user id no
edtBolum is board numbers for messages of members is not count.
<?php          
 
include('Settings.php');       
@
mysql_connect($db_server,$db_user,$db_passwd) || die("Can't connect to MySQL");                     
@
mysql_select_db($db_name) || die("Can't connect to database");      
for (
$i=1$i<=$edtuye; ++$i)
{
$veri="UPDATE smf_members SET posts=(SELECT COUNT(*) FROM smf_messages WHERE ID_MEMBER=$i AND ID_BOARD NOT IN ($edtbolum)) WHERE ID_MEMBER=$i";
$veri_gir=mysql_query($veri);

if (isset(
$veri_gir))
{
echo 
"Successfully";
}
else
{
echo 
"Error found.";
}       
?>
Tek sorunu; düşünebilmekti...

Advertisement: