Did you get a useable answer to this?
> Using PHP and MySQL, how can I do an ORDER BY where city = $city?
> happens is this, I have a search engine which works nicely, but I want
> bring up the closest matches to the search first at the top, how can I
> Say you enter Munich Hotels, I want all entries with Munich Hotels to
> first before the rest, any ideas?
ORDER BY city="Munich Hotels", city;
The first 'column' in the ORDER BY clause evaluates to TRUE or FALSE,
and thus puts Munich Hotels (TRUE) above everything else (FALSE), and
within those two groupings city is sequenced into alpha ASC (meaningless
for the M-Hotels grouping because they all have the same city value).
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php