romy_mathew has asked for the wisdom of the Perl Monks concerning the following question:
select @rownum:=@rownum+1 AS rank, p.* from player p, (SELECT @rownum:=0) r order by score desc limit 10
But when I use this in $sth = $dbh->prepare("Select @rownum:=@rownum+1 ‘rank’, p.* from player p, (SELECT @rownum:=0) r order by score desc limit 10");
I get errors and the statement is not getting executed. ANy Suggestion ...?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Display row number perl DBI
by moritz (Cardinal) on May 28, 2012 at 16:32 UTC | |
by romy_mathew (Beadle) on May 28, 2012 at 17:50 UTC | |
by moritz (Cardinal) on May 28, 2012 at 18:13 UTC | |
by vinian (Beadle) on May 29, 2012 at 08:45 UTC |