Hi there,

This is my problem now... I have a table containing different paths, like this:

+------+----+---+------------+
| Path | X  | Y | WaypointNr |
+------+----+---+------------+
| P1   |  1 | 5 |          1 |
| P1   |  2 | 6 |          2 |
| P1   |  3 | 7 |          3 |
| P1   |  8 | 3 |          4 |
| P2   | 11 | 4 |          1 |
| P2   |  7 | 3 |          2 |
| P2   |  5 | 2 |          3 |
| P2   |  2 | 1 |          4 |
+------+----+---+------------+


I need to draw a map from these paths, so I make a following query to get waypoints 
and paths located in defined area (where the corners are (3,2) and (7,6).

mysql> SELECT * FROM waypoints WHERE X > 2 AND X < 8 AND Y > 1 AND Y < 7;
+------+---+---+------------+
| Path | X | Y | WaypointNr |
+------+---+---+------------+
| P2   | 7 | 3 |          2 |
| P2   | 5 | 2 |          3 |
+------+---+---+------------+

That's OK... but now I would like to get also those waypoints which ones are next to 
these results (on the same path). In this case, I want also points 1 and 4 on P2. How?

Emm... Hope that you could understand even something. ;)

- Ville

.................................................................
Ville Mattila
Ikaalinen, Finland
[EMAIL PROTECTED]



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

Reply via email to