Jump to content

Search the Community

Showing results for tags 'DESC LIMIT'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Hello internet, I am using the following calls to get an ordered list of largest to smallest info of all that row's data: *NOTE: there are only 6 entries in mydatabase with grp='c' $result = mysql_query("SELECT * FROM mydatabase WHERE grp='c' ORDER BY score DESC LIMIT 0,1", $con); $rows = array();while ($row = mysql_fetch_assoc($result))...... more code to place data into a specific id to use an onload to populate objects $result = mysql_query("SELECT * FROM mydatabase WHERE grp='c' ORDER BY score DESC LIMIT 1,1", $con); $rows = array();while ($row = mysql_fetch_assoc($result))...... more code to place data into a specific id to use an onload to populate objects $result = mysql_query("SELECT * FROM mydatabase WHERE grp='c' ORDER BY score DESC LIMIT 2,1", $con); $rows = array();while ($row = mysql_fetch_assoc($result))...... more code to place data into a specific id to use an onload to populate objects $result = mysql_query("SELECT * FROM mydatabase WHERE grp='c' ORDER BY score DESC LIMIT 3,1", $con); $rows = array();while ($row = mysql_fetch_assoc($result))...... more code to place data into a specific id to use an onload to populate objects $result = mysql_query("SELECT * FROM mydatabase WHERE grp='c' ORDER BY score DESC LIMIT 4,1", $con); $rows = array();while ($row = mysql_fetch_assoc($result))...... more code to place data into a specific id to use an onload to populate objects $result = mysql_query("SELECT * FROM mydatabase WHERE grp='c' ORDER BY score DESC LIMIT 5,1", $con); $rows = array();while ($row = mysql_fetch_assoc($result))...... more code to place data into a specific id to use an onload to populate objects What ends up happening is that I get a list together but here is what I get DESC LIMIT 0,1 >>> this produces the second largest score - NOT the largest DESC LIMIT 1,1 >>> this produces the third largest score DESC LIMIT 2,1 >>> this produces the fourth largest score DESC LIMIT 3,1 >>> this produces the fifth largest score DESC LIMIT 4,1 >>> this produces the sixth largest score DESC LIMIT 5,1 >>> this produces the LARGEST score - not the smallest
×
×
  • Create New...