Log in

View Full Version : how to make my chat faster?



Demonicman
11-13-2008, 04:39 AM
I made a php chat that refreshes and uses the limit command to display items from the database in chat... however the chat table gets so filled with lines of chat that it becomes laggy

how can i create a check to make anything above the 25th item in the table deleted and moved to another table so that i can still have a log of chat?

the primary key in the table is ID and it auto increments

Nile
11-13-2008, 11:11 PM
Use this:


$limit = 25;
$query = "SELECT * FROM blah WHERE blah = blah LIMIT $limit";

Then you can either make an admin panel for yourself with your old version, or you can just see the other chats in mysql.

Demonicman
11-14-2008, 12:42 PM
i have that, but it still causes massive lag, so what im trying to do is move anything that is over 25 rows down in the table into a copy of a table so i still have a copy of chat for reference, but chat doesnt lag as much