Здравствуйте..
Такая проблема, кусок кода *Журнал оповещение* Жрет 2800 запросов сразу....
<?
/////////Кода мода начало///////////////////////////////
if(mysql_result(mysql_query_m("SELECT COUNT(*) FROM `jurnal_up2` WHERE `id_user` = '$user[id]' AND `them_id` = '$them[id]' "
,0)==0) {
mysql_query_m("INSERT INTO `jurnal_up2` (`id_user`, `them_id`, `date`, `up`, `upset`, `time`) values('$user[id]', '$them[id]', '$time', '0', '0', '$time')"
;
}
else
{
mysql_query_m("UPDATE `jurnal_up2` SET `date` = '$time', `up` = '0', `upset` = '0' , `time` = '$time' WHERE `them_id` = '$them[id]' AND `id_user` = '$user[id]'"
;
}
if (isset($_GET['otvet']))
{
mysql_query_m("UPDATE `jurnal_up2` SET `date` = '$time', `upset` = '1' WHERE `them_id` = '$them[id]' AND `id_user` = '".intval($_GET['otvet'])."' AND `id_user` != '$user[id]'"
;
}
$ank=get_user($them['id_user']);
if ($ank['id']!=$user['id'])
{
mysql_query_m("UPDATE `jurnal_up2` SET `date` = '$time', `upset` = '1' WHERE `them_id` = '$them[id]' AND `id_user` = '$ank[id]'"
;
}
$jur=mysql_query_m("SELECT * FROM `jurnal_up2`"
;
while ($upset = mysql_fetch_array($jur))
{
$up=mysql_fetch_assoc(mysql_query_m("SELECT * FROM `jurnal_up2` WHERE `id` = $upset[id]"
);
mysql_query_m("UPDATE `jurnal_up2` SET `date` = '$time', `up` = '".($up['up']+1)."', `upset` = '1' WHERE `id` = '$upset[id]' AND `them_id` = '$them[id]' AND `upset` = '0' AND `id_user` != '$user[id]' AND '$up[up]' != '3'"
;
}
//////////Конец конец////////////////////////////////////////?>
И я не знаю как исправить это, помогите пожалуйста