Reading data out from different files

Discussion in 'Perl' started by Mario Fischer, Oct 15, 2003.

  1. Hi!

    I wrote a small SQL-parser for SELECT-statements for the purpose of
    easier switching between databases. The parser also works with
    multiple-table-queries.
    Until here everything is fine, but when I try to read out the
    information from flatfiles I get in trouble.
    An example: I'm reading all columns of 2 tables and I want to search
    for something defined in the WHERE-statement. For example I want to
    manage user-sessions in a control-panel and want to find out more
    about the user-id in the sessions-table that belongs to a user-name in
    the user-table.
    In Perl I would read the content of the tables into a hash and in the
    worst case I have to compare each line from the one table with all
    lines from the other one. That is very unefficient.

    Is there a better solution (maybe someone knows how this problem is
    solved in mySQL)?

    Thank you.

    Mario
    Mario Fischer, Oct 15, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Angelico
    Replies:
    0
    Views:
    130
    Chris Angelico
    Jan 28, 2013
  2. Dave Angel
    Replies:
    0
    Views:
    127
    Dave Angel
    Jan 28, 2013
  3. Chris Angelico
    Replies:
    0
    Views:
    132
    Chris Angelico
    Jan 28, 2013
  4. Dave Angel
    Replies:
    0
    Views:
    126
    Dave Angel
    Jan 28, 2013
  5. Chris Angelico
    Replies:
    0
    Views:
    129
    Chris Angelico
    Jan 28, 2013
Loading...

Share This Page