Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: IRC log search

by FitTrend (Pilgrim)
on Feb 22, 2005 at 13:59 UTC ( #433331=note: print w/ replies, xml ) Need Help??

in reply to Re^2: IRC log search
in thread IRC log search

Based on what I know, I would say the schema should be minimally:

id, int(11) auto_increment
nickname, varchar 100
message, text
timestamp, int(11)
dateStamp, time/date

Some would argue that you don't need 2 timestamp fields. However in my experience, I sometimes have the need to search base on an EPOCH time range (timestamp) or to use MySQLs date system to search between certain dates.

My logic for this database is:

  • You can limit queries base on nickname
  • You can limit queries base on time range
  • You can perform certain matches based on text
  • Use a combination of any/all three

I've included an ID field. This field exists based on common database practices and for future growth. I feel that you may need to code a sub or script to parse a raw log to insert it into the database properly. It may get tricky depending on how the IRC formats the time stamp in the logs.

Hope this helps

Comment on Re^3: IRC log search

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433331]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-07-14 09:10 GMT
Find Nodes?
    Voting Booth?

    When choosing user names for websites, I prefer to use:

    Results (257 votes), past polls