Results 1 to 3 of 3

Thread: how to make my chat faster?

  1. #1
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default how to make my chat faster?

    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
    http://www.insanecombat.com << bored? check out ma game

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Use this:
    Code:
    $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.
    Jeremy | jfein.net

  3. #3
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    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
    http://www.insanecombat.com << bored? check out ma game

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •