Re: RE: [PHP-DB] Order By for search results ???
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: RE: [PHP-DB] Order By for search results ??? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13520@lists.php.net to get a copy of this message | ||
>Maybe I'm slow...I'm trying to decipher what you're trying to do. Show us your
>table layout
>Show us your search criteria and code
>Show us a dump of your table so we can see what the data look like
ahhh give the chap a break, this is 4th (or so) posting. he thinks we're all wonderful!
Let's not
mess that up for him:
You had it when you said: "..how do I ORDER BY and then.."
SELECT * FROM <your_table> WHERE foo LIKE '%bar%' ORDER BY <some_field> LIMIT
<some_limit>
* You could set <some_field> in your code or have it as a variable set from the web-page:
"Click
table headings to sort by that field" etc etc
* You could also have <some_limit> set as a number from a select menu again on the web page of
search results.
Good luck!
Russ
PS Where is this search engine? can I have a look??? go on - you know it makes sense....
On Thu, 18 Oct 2001 12:46:25 -0500 Rick Emery <remery@excel.com> wrote:
> Maybe I'm slow...
>
> I'm trying to decipher what you're trying to do.
>
> Show us your table layout
> Show us your search criteria and code
> Show us a dump of your table so we can see what the data look like
>
>
> -----Original Message-----
> From: Chris Payne [mailto:chris@planetoxygene.com]
> Sent: Thursday, October 18, 2001 12:08 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Order By for search results ???
>
>
> Hi there everyone,
>
> I am happy, I have my search engine working almost perfectly (Touch wood :-)
> but there is one problem. When I search - say for Backpacking in Australia
> it doesn't bring up the results in that order as I have to order by country,
> city or whatever. What I want to know is, how do I ORDER BY and then my
> search results so that I get the nearest matches at the top of the search?
>
> Thank you all for your help, this list is the best place to be for PHP :-)
>
> Chris
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#