I have a table (example 1):

tblRegulations
fldCountryID (int)
fldRegualtionType (int)
fldRegulationUpdated (date)
fldRegulation (text)

Each country can have up to 7 different regulation types. I have
designed the table like this so I can have one fulltext index on
fldRegulation, and thus search all the regulations for all countries
in one hit.

If I designed the table like this (example 2):

tblRegulations
fldCountryID (int)
fldRegualtion_1 (text)
fldRegulation_1_Updated (date)
fldRegualtion_2 (text)
fldRegulation_2_Updated (date)
fldRegualtion_3 (text)
fldRegulation_3_Updated (date)
…
fldRegualtion_7 (text)
fldRegulation_7_Updated (date)

I would need 7 full text indexes, one for each of fldRegulation_X. And
if I wanted to search any combination of regulation types I would need
2^7 full text indexes! So I have decided my table design will be the
first example.

Now for my problem:

I want the return a result from the first example table like this:

Results
fldCountryID (int)
fldRegulation_1_Updated (date)
fldRegulation_2_Updated (date)
fldRegulation_3_Updated (date)
fldRegulation_4_Updated (date)
fldRegulation_5_Updated (date)
fldRegulation_6_Updated (date)
fldRegulation_7_Updated (date)

How would I write such a query? Am I trying to do the impossible? I
want only one fulltext index but it seems like I can only get the
summary results if I design my table as in example 2.

I will greatly appreciate any advice.

Best regards,
Seth

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to