> From: Scott Taylor [mailto:[EMAIL PROTECTED]]
> Anyone know how I can do this? I can't seem to get past a
> syntax error
> near the 'while'. (it worked up to the point I tried to put
> it into a
> table, and the table works fine by itself)
You can't have a while block inside of another expression.
You could use a fetchall_* and map though.
This is bordering on being OT though...
>
> print table({-border=>undef},
> caption('Contacts'),
> Tr({-align=>CENTER,-valign=>TOP},
> [
> th(['First Name','Last Name','Title','Company','Work
> Ph.','Home Ph.',
> 'Fax Number','Other Ph.','Email
> Addr.','City','Prov.','Postal',
> 'Country','Custom 1','Custom 2','Custom 3','Custome
> 4','Notes',
> 'Category']),
>
> while ( @columns = $cursor->fetchrow ) {
> td([
> '$columns[0]', '$columns[1]', '$columns[2]', '$columns[3]',
> '$columns[4]', '$columns[5]', '$columns[6]', '$columns[7]',
> '$columns[8]', '$columns[9]', '$columns[10]','$columns[11]',
> '$columns[12]','$columns[13]','$columns[14]','$columns[15]',
> '$columns[16]','$columns[17]','$columns[18]','$columns[19]',
> '$columns[20]'])
> }
> ]
> )
> );