Snaip3Rs Posted May 22, 2010 Report Share Posted May 22, 2010 Atkal es! :D Skatos es te vienīgais taisu postus. Visi jau tik gudri ka paši zin, bet es vēl te kaut ko maisos. man ir tāda lieta ka es gribu lai varētu uzlikt order by nevis kādu table bet $q = "SELECT * FROM top ORDER BY ?"; $net_vote = $row['votes_up'] - $row['votes_down']; $net_vote jo vajag lai pirmajā vietā rāditos ar lielāko kopējo blasu skaitu! Quote Link to comment Share on other sites More sharing options...
PheliX Posted May 22, 2010 Report Share Posted May 22, 2010 $q = "SELECT * FROM top ORDER BY votes_up - votes_down"; Quote Link to comment Share on other sites More sharing options...
marcis Posted May 22, 2010 Report Share Posted May 22, 2010 SELECT * FROM `tabula` ORDER BY `kolona1`-`kolona2` DESC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.