Re: [PHP-DB] limiting field extraction to 40 characters

2002-12-12 Thread Peter Beckman
$1 is a bad variable. You can't have variables that start with a number. Try $a or $foo or $bar. On Thu, 12 Dec 2002, mike karthauser wrote: > If i try the below in my query i get no results. > > Ideally i would like to do this (not valid sql) > > printf("\n"); > while ($myrow = mysql_fetch_ar

Re: [PHP-DB] limiting field extraction to 40 characters

2002-12-12 Thread mike karthauser
If i try the below in my query i get no results. Ideally i would like to do this (not valid sql) \n"); while ($myrow = mysql_fetch_array($result)) { $l=$myrow['coursecode']; ?>>\n"); ?> on 11/12/02 5:26 pm, Peter Beckman at [EMAIL PROTECTED] wrote: > LEFT(str,len) > Returns the leftmost len c

Re: [PHP-DB] limiting field extraction to 40 characters

2002-12-11 Thread Peter Beckman
LEFT(str,len) Returns the leftmost len characters from the string str: mysql> SELECT LEFT('foobarbar', 5); -> 'fooba' This function is multi-byte safe. select left(coursecode,40) from courses Peter On Wed, 11 Dec 2002, mike karthauser wrote: > I am using >