jaymc Posted January 9, 2008 Share Posted January 9, 2008 Not sure if this is php, but not sure if its mysql or ajax either Anyway, I need a query run every 5 minutes to check for new messages, this is so new message alerts can be audio alerted without users having to manually check or refresh the page The problem Im having if there are a large amount online (1000) it gets rather rediculous I have a 2 minute checker aswell that queries a table for livechat requests Currently using ajax to acess a script Desperately want an alternitive method, its killing me off! Hope someone has a good idea Quote Link to comment Share on other sites More sharing options...
interpim Posted January 9, 2008 Share Posted January 9, 2008 CRON Job maybe? Quote Link to comment Share on other sites More sharing options...
jaymc Posted January 9, 2008 Author Share Posted January 9, 2008 Each query is unique the the user, thus a cron job could only replicate what the initial query per user is doing? Unless you mean something different.. Quote Link to comment Share on other sites More sharing options...
revraz Posted January 9, 2008 Share Posted January 9, 2008 I would lean more to Java/Ajax than PHP. Quote Link to comment Share on other sites More sharing options...
jaymc Posted January 9, 2008 Author Share Posted January 9, 2008 I do use javascript for the send and receives Never the less, I still need to hook onto php for the mysql business and calculations.. Quote Link to comment Share on other sites More sharing options...
nikefido Posted January 9, 2008 Share Posted January 9, 2008 I suppose the only suggestion worth mentioning that I know of is to use the simplest query possible (just a count or something) and possibly make it a stored procedure or (even better) use a trigger. (google!) 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.