Re: Need help querying a database of polynomials

2006-06-01 Thread Michael Stassen
Lew E. Lefton wrote: > Hi, > > I hope this is an appropriate place to ask this question, if you think > it is better suited for another list/forum, please let me know. > > I have a table that looks like this: > > mysql> select polynomial_id, term_id from polynomial; > +---+-+

Re: Need help querying a database of polynomials

2006-05-31 Thread Pooly
2006/5/31, Peter Brawley <[EMAIL PROTECTED]>: Lew, >If I have another polynomial, say the sum of terms 1,3,4, and 5, how can I quickly search this >database to see if it's already been stored? SELECT DISTINCT polynomial_id FROM polynomial p1 INNER JOIN polynomial p2 ON p1.term_id=1 AND p2.ter

Re: Need help querying a database of polynomials

2006-05-31 Thread Peter Brawley
Lew, >If I have another polynomial, say the sum of terms 1,3,4, and 5, how can I quickly search this >database to see if it's already been stored? SELECT DISTINCT polynomial_id FROM polynomial p1 INNER JOIN polynomial p2 ON p1.term_id=1 AND p2.term_id=3 INNER JOIN polynomial p3 ON p2.term_id=3