Problem in Sorting two resultset..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashishhbti
    New Member
    • Oct 2007
    • 1

    #1

    Problem in Sorting two resultset..

    I ave a problem in sorting two resultset..
    Supoose we have a follwing field in database..

    Code:
    id name vote type
    
    1  ashish  2   1
    2  ashish  4   2
    i want to select top 5 records(accordi ng to vote) of type 1 and top voted 5 records of type 2 ....
    then want to show on page these 10 records on sorting order according to vote ..

    any suggestion ??

    Please help me...

    Thanks
    Ashish...
    Last edited by Atli; Oct 8 '07, 08:26 PM. Reason: Added [code] tags.
  • kaioshin00
    New Member
    • Nov 2006
    • 46

    #2
    Connect to your database with php, enter and parse the correct queries, and display the results in a webpage.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi Ashish. Welcome to The Scripts!

      Have you made any attempts at this yourself?
      Can we see your code?

      You will have to build a query to fetch those records from the database. How that is done depends on what type of SQL server you are using. (MySQL, MSSQL, Postgree, etc...)

      You will also have to create a script to execute that query on you database and display the results. Again, how you can accomplish this depends on what type of SQL server you use.

      Comment

      Working...