MySQL Forums
Forum List  »  Perl

Re: Good return on mysql command line bad return in perl DBI
Posted by: Bobby Jones
Date: April 15, 2009 07:06PM

The only problem with that is if I refine the search statement it will not work in code. For instance if I do the following it will work the way I want it to with the select statement but not with the code since I will only get a small amount of returns.

SELECT *, (@rownum := 0)
FROM (SELECT @rownum := @rownum+1 AS rank, team_id, team_name, points FROM teams order by points DESC) AS derived_table where team_name like 'St%';

With the above statement I'll get there overall rank but only those that start with St. In code I would not get there over all rank I would only be able to rank them amongst the ones that start with St. That is my problem here.



Edited 1 time(s). Last edit at 04/15/2009 07:07PM by Bobby Jones.

Options: ReplyQuote


Subject
Written By
Posted
Re: Good return on mysql command line bad return in perl DBI
April 15, 2009 07:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.