[Thread Prev][Thread Next][Index]

TMAPDBI: multiple SELECT command



Hi all,

I am working with a LAS connected to a MySQL database and wrote a customized TMAPDBI driver for my database.

In the constraints menu, one can turn on the selection "multiselect" so users can select multiple variables at a time.
However, when the query is translated into MySQL commands in the driver, it's not possible to have one SELECT statement for the same variable that has several different values.

For example, if I query data and select in the constraint that I want data from transect=1 and transect=2, it transfers into the driver as:

SELECT variables FOR table_name WHERE (....constarints...) AND transect=1 AND transect=2.

This is of course not possible in MySQL.
What should happen, I think is:

SELECT variables FOR table_name WHERE (....constarints...) AND transect=1
AND
SELECT variables FOR table_name WHERE (....constarints...) AND transect=2
then combine the result and display.


Since I am not the best PerlDBI programmer, I was wondering if anybody else out there had already modified the code so that if I one does a multiselect (between 2 to an infinite number), there is a loop creating between 2 to an infinite number of SELECT loops and then combine the results and displays it.

Thanks,
Jerome.



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement