Chris Thorpe writes:
> My question is how do I query the database to return a valid route(s)
> supplying only a start and end point.
> ie SELECT !!route!! WHERE start=A and end=D,
>
> Personally I don't see how this is possible without code, hence why I am
> querying the brains of the world!!!
Indeed it isn't. SQL doesn't include a shortest path algorithm.
It's easy enough to implement Dijkstra's algorithm (unless you want
use Fibbonaci heaps, in which case it's a wee bit trickier).
I suppose this is a task for which stored procedures would really be
useful.
//C
--
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