Goose87 Posted October 21, 2009 Share Posted October 21, 2009 Dear all, I apologise for my serious lack of knowledge in this area.. and i'm pretty sure that you can't use php, but i just need advice + some support if that's possible. I have recently added a chat feature to my website. It currently displays on every page in the title bar. It displays 30 rows of chat and updates every time the page is changed or refreshed. I would like the mysql query that collects the latest messages to update every 5-10 seconds if that's possible.. or ideally... update when there is a new post.. that would be perfect.. Can someone point me in the right direction. Or ideally, help me out with this. Many thanks in advance. Goose. Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted October 21, 2009 Share Posted October 21, 2009 look into AJAX / Javascript to have the chat box update asynchronously (without needing to refresh the page). tons of tutorials out there .. look into either jQuery or MooTools for the infrastructure. Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted October 21, 2009 Share Posted October 21, 2009 It's a bad idea to do refreshes every 5-10 seconds on your server per user, and will have serious implications when you get a lot of users accessing your site at the same time Quote Link to comment Share on other sites More sharing options...
Goose87 Posted October 21, 2009 Author Share Posted October 21, 2009 Maybe it's a feature I should just forget about? That did cross my mind, but as it's just one query.. i didn't think it would be that bad.. meh.. to be honest, i will look into the code to do it, but I won't implement it. It's just not what I need for that feature I think.. Thanks anyways all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.