I cannot seem to find a solution to get those errors out of my chat.
I have been trying several days to make this work but nothing helps.
Please look into this and update my code if possible.
thanks.....
Marc
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site67/fst/var/www/html/chat/inc/clearing.inc.php on line 5
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site67/fst/var/www/html/chat/inc/clearing.inc.php on line 19
You have an error in your SQL syntax near 'and m.id = r.creator_id and ((m.user_rights = 0) or (r.private_partner_id' at line 2
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site67/fst/var/www/html/chat/inc/clearing.inc.php on line 45
$query = "select id from ".$db_table_prefix."rooms where last_activity < ".time()." - $user_timeout";
$rst = mysql_query($query);
$wh = "";
while($row = mysql_fetch_array($rst))
{
$wh .= $row["id"].", ";
}
if($wh)
{
$wh = substr($wh, 0, -2);
$query = "delete from ".$db_table_prefix."room_members where user_id in ($wh)";
mysql_query($query);
}
$query = "select id from ".$db_table_prefix."chat_messages where message_time < ".time()." - $message_expiration_time";
$rst = mysql_query($query);
$wh = "";
while($row = mysql_fetch_array($rst))
{
$wh .= $row["id"].", ";
}
if($wh)
{
$wh = substr($wh, 0, -2);
$query = "delete from ".$db_table_prefix."recipients where message_id in ($wh)";
mysql_query($query);
$query = "delete from ".$db_table_prefix."chat_messages where id in ($wh)";
mysql_query($query);
}
if($auto_delete_admins_rooms)
{
$query = "select id from ".$db_table_prefix."rooms where last_activity < ".time()." - $room_expiration_time";
}
else
{
$query = "select r.id from ".$db_table_prefix."rooms r, ".$db_table_prefix."members m
where r.last_activity < ".time()." - $room_expiration_time and
m.id = r.creator_id and ((m.user_rights = ".$user_permissions["users"].") or (r.private_partner_id > 0))";
}
$rst = mysql_query($query);
echo mysql_error();
$wh = "";
while($row = mysql_fetch_array($rst))
{
$wh .= $row["id"].", ";
}
if($wh)
{
$wh = substr($wh, 0, -2);