List:General Discussion« Previous MessageNext Message »
From:Jasper Bryant-Greene Date:October 21 2005 4:36am
Subject:Re: left not working
View as plain text  
On Fri, 2005-10-21 at 06:34 +0200, Dotan Cohen wrote:
> Why would this work:
> SELECT question, short, longa, technical FROM -snip- WHERE filename='$filename'
> 
> But this not:
> SELECT question, short, left(longa,40), technical FROM -snip- WHERE
> filename='$filename'

If you want it to work like that, you need to do:

left(longa,40) AS longa

> 
> The line that looks like this:
> $long =mysql_result($result, 0, "longa");
> 
> Is throwing this error:
> Warning: mysql_result(): longa not found in MySQL result index 4 in
> *** on line 13

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: jasper@stripped
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

Thread
left not workingDotan Cohen21 Oct
  • Re: left not workingJasper Bryant-Greene21 Oct