Results 1 to 7 of 7

Thread: [RESOLVED] Sort results by values in another table

Threaded View

  1. #1

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Resolved [RESOLVED] Sort results by values in another table

    I'm trying to order the results by values in another table.

    There is one table named listings with stuff like:

    id
    name
    description


    And there are votes users leave on each listing stored in a table votes:

    id
    listing_id
    rating
    (1-5)

    Now, on the main page that displays the listings, there is a filter option for sorting the results by user rating. How would I do this? Can someone give me an example? It's kind of urgent...

    Edit: Is this the job for a stored procedure? I don't think he has a MySQL version that supports these though and I've only read briefly on them. If there's another solution, even if it's kind of a dirty fix, that would be better.
    Last edited by DigiRev; May 21st, 2008 at 08:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width