Reading data out from different files

M

Mario Fischer

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top