A Taylor wrote:
> howdy all,
> I was wondering if you could help me, I have a perl script that executes a
> SQL statement:
>
> 'SELECT prop_rank FROM main ORDER BY prop_rank DESC'
>
> This returns many records but all i am interested in is the highest rank
> hence the 'ORDER BY prop_rank DESC'.
thanks everyone - a lot of help and I have learned loads ;-)
>SELECT MAX(prop_rank)...
>"A Taylor" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > howdy all,
> > I was wondering if you could help me, I have a perl script that executes
>a
> > SQL statement:
On Tue, Jun 11, 2002 at 05:49:53PM +, A Taylor wrote:
> 'SELECT prop_rank FROM main ORDER BY prop_rank DESC'
>
> This returns many records but all i am interested in is the highest rank
> hence the 'ORDER BY prop_rank DESC'.
> I then retreive the highest rank like so:
>
> $rank = $sth1->fet
Uh,... no (atleast IMHO)
SELECT MAX(prop_rank)...
would be a more efficient approach
HTH
"A Taylor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> howdy all,
> I was wondering if you could help me, I have a perl script that executes a
> SQL statement:
>
> 'SELE
On Tue, 11 Jun 2002, A Taylor wrote:
>
> $rank = $sth1->fetchrow_array();
>
> Now, my question is this: is this the right way to retreive just 1 record,
> using fetchrow_array(); ??? or is there a more acceptable way. This does
> work, its just the 'array()' part is making me a little uneasy.
>
howdy all,
I was wondering if you could help me, I have a perl script that executes a
SQL statement:
'SELECT prop_rank FROM main ORDER BY prop_rank DESC'
This returns many records but all i am interested in is the highest rank
hence the 'ORDER BY prop_rank DESC'.
I then retreive the highest ra