template toolkit .. one more kwestion

2001-01-29 Thread Robin Szemeti
OK .. this ones driving me dippy .. I'm playing with Template::Toolkit with a bit of MySQL and the usual things ... so I wrote a few functions that retreive lists of err stuff. for speed i use dbi's fetchall_arrayref which returns a reference to an array of references to arrays ...uh huh I

Re: template toolkit .. one more kwestion

2001-01-29 Thread Rob Partington
In message [EMAIL PROTECTED], Robin Szemeti [EMAIL PROTECTED] writes: this works fine if the function returns a list with more than one thing in it .. if there is only one thing in the array I get a 'dont know how to access [ 3 ].0 if for example item 3 is returned. if I access the result

Re: template toolkit .. one more kwestion

2001-01-29 Thread Robin Szemeti
On Mon, 29 Jan 2001, you wrote: In message [EMAIL PROTECTED], Robin Szemeti [EMAIL PROTECTED] writes: this works fine if the function returns a list with more than one thing in it .. if there is only one thing in the array I get a 'dont know how to access [ 3 ].0 if for example item 3 is

Re: template toolkit .. one more kwestion solved

2001-01-29 Thread Robin Szemeti
On Mon, 29 Jan 2001, you wrote: Sounds like your dereferencing function may be returning a SCALAR instead of an ARRAY when there's only one result? could be ... I had : my($data)=$sth-fetchall_arrayref; return @{$data}; which I thought should return a flat list of references to

Re: template toolkit .. one more kwestion solved

2001-01-29 Thread Paul Makepeace
On Mon, Jan 29, 2001 at 05:31:52PM +0100, Philip Newton wrote: Reminds me of fits I had when doing Vignette/Tcl with lists of lists that I passed to another template with HTTP POST. When the list of lists contained only one element, it didn't wrap that list in extra {} so the foreach say a