Michael Thygs writes:
> Hello Bruno, > > its a little bit complicated. You have to put a little bit of brain in it! > > The situation you ask for is: > > tab2.interval <--------------------> > possible intervals of table 1, which should be displayed are: > 1. <-----------> > 2. <-------> > 3. <------------> > 4. <-----------------------------> You can actually simplify it more than that by looking at what intervals _don't_ match. These are the ones that end before tab2.interval starts or start after tab2.interval ends. I didn't realize this blindingly obvious fact until I made a take of all the comparisons and positions of the intervals and started looking for boolean operators to separate the cases as easily as possible. D'oh. //C - had better go do something else now. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php