Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
spamyboy
- Forum Contributor
- Posts: 266
- Joined: Sun Nov 06, 2005 11:29 am
- Location: Lithuania, vilnius
Post
by spamyboy »
Code: Select all
$result = mysql_query("SELECT * FROM games $sql_filter ORDER BY id DESC AND love DESC LIMIT $from, $max_results");
I want to order by to options at time, ID & love (love is number of hits)
-
feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Post
by feyd »
SQL (query) questions goes in Databases, not PHP - Code.
ORDER BY clauses use comma separations to distinguish between decision algorithms.
-
spamyboy
- Forum Contributor
- Posts: 266
- Joined: Sun Nov 06, 2005 11:29 am
- Location: Lithuania, vilnius
Post
by spamyboy »
Thank you.