I am sorry but I don't understand the select query you wrote, could you
perhaps explain how it works or point me to a reference that might help me
understand it?

Many thanks for responding,
Sid.

Sid Price Software Design
http://www.softtools.com
 
-----Original Message-----
From: Micah Stevens [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 25, 2007 9:23 PM
To: [EMAIL PROTECTED]; mysql@lists.mysql.com
Subject: Re: Sorting Problem

This doesn't work?

SELECT businesses.name from businesses
left join links using (businessID)
left join categories using (categoryID)
where category.name = 'something'
order by businesses.name ASC



On 03/25/2007 12:40 PM, Sid Price wrote:
> Hello,
>
>  
>
> I have a MySQL database design that provides an online business directory.
> It consists of three tables; one with the names and addresses of the
> businesses (names), one with the categories of businesses (categories),
and
> one that has an entry (a category ID and a business ID) for each
> business/category pairing (entries), a business may be in multiple
> categories.
>
>  
>
> The problem I am having is after having queried the "entries" table for
all
> the entries for a given category I query the "names" table for each entry
to
> display the business name and address, I can not figure a way to sort the
> displayed data by company name, The "entries" table holds the business ID
> and category ID so sorting the entries that match the category doesn't
help.
>
>  
>
> Do I need to create a temporary table to hold the business names/addresses
> in a category so that I can then sort it?
>
>  
>
> Thanks,
>
> Sid.
>
>  
>
> Sid Price Software Design
>
> http://www.softtools.com
>
>  
>
>  
>
>
>   


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to