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
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