On Wed, Nov 27, 2002 at 09:50:19AM -0500, Chris Faust wrote: > Is this really true?? > > >> > #here is the problem area > >> > while ($row = $sth->fetchrow_array()) { > >> > >> Here you are storing your fetchrow_array to a scalar, which > >> means $row contains the number of columns in the select (1), you > >> need to store it to an array: > > I do this all the time when I know for a fact that I'm only going to match > on a single row and get a single value.
No, it's not really true. fetchrow_array() uses wantarray() to determine what context it is being called in, and in scalar context it returns just the first value selected. Ronald