• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

max_msg, connect, mysql container

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby aacraig » Thu May 10, 2007 12:30 pm

When a user connects to my chat (I'm using the mysql container), they don't see the last max_msg messages. They see a seemingly random number of past messages.

I've done some investigating and have found that in getnewmsg.class.php on lines 60, this code
$from_id = $container->getLastId($recipient)-$c->max_msg;

returns the wrong id.

this may be specific to the mysql container. I've seen that it deletes obsolete messages. Currently, if I SELECT from mysql the last messages, I see that there is a jump in the leaf (id) values.

SELECT leaf FROM phpfreechat ORDER BY leaf DESC;

There are gaps between some messages. Therefore, if as in my case, the last id is 951, and I set max_msg to 100, I may not actually get 100 messages, as some values are missing in the consecutive leaf values.
aacraig
New member
 
Posts: 3
Joined: Sun Apr 08, 2007 6:09 pm
Top

Postby phpfreechat » Thu May 10, 2007 2:52 pm

Did you rehash you chat to take into account the new max_msg value ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 5 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub