Re: Query Help!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jusa_98@xxxxxxxxx (Jerry) wrote in 
news:20040408090556.90296.qmail@xxxxxxxxxxxxxxxxxxxxxxx:

> Hi Everyone, Happy Easter to you all.
> 
> I have this query, reasoning for posting on this
> Mailing List is under it. :)
> 
> SELECT `username` , `score` FROM round" .
> $round_number . " WHERE 1
> ORDER BY `score` DESC LIMIT 0, 30
> 
> Is there a way to make it output the $round_number -1
> (minus one number)?
> 
> I need this to be a temp. meassure as I only need the
> number previous to the current $round_number for a few
> days.  Is there a way in the query I can subtrack the
> value by 1 and change it later when I want to show the
> current round?
> 
> If it's too much hassles I can add $prev_round_number
> and change the values each week but thought there
> might be another way.

Have you tried 
SELECT `username` , `score` FROM round" .
($round_number -1) . " WHERE 1
ORDER BY `score` DESC LIMIT 0, 30

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux