List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 17 1999 2:12pm
Subject:Re: How to delete a member from a SET column
View as plain text  
On Thu, 1999-09-16 21:39:16 -0400, James Manning wrote:
> > > > # Get (reference to) the result row.
> > > > my $row = $sth->fetchrow_arrayref;
> > > > 
> > > > # Extract the 'Type' field (it's the 2nd one!).
> > > > my $type = $row->[1];
[...]
> > > why wouldn't you fetchrow_hashref (or whatever it's called) and
> > > ->{'Type'} ?
> > 
> > In 1st place, just because I didn't think of it, stupid me.  In 2nd
> > place (now I did have a look at it), because this only seems to give
> > my a type identifier, but no textual representation of the actual SET
> > definition ...  So I don't see a real, more portable alternative to my
> > first approach using DESCRIBE, do you?
> 
> Hunh?  If this is true, I think you might have found a bug
> somewhere... running your exact script, all I had to do was change
> fetchrow_arrayref to fetchrow_hashref and $row->[1] to $row->{'Type'}
> and I got the exact same output...

Ah, sorry, I did misunderstood you.

What I tried was:
  $sth->execute
      or die "execute failed: ", $sth->errstr;
  my $type = $sth->{'type'}[0];
  print "\nType is $type\n\n";
And here the result is: Type is 254

I thought, you'd like to get away from interpreting the textual SET
definition ...

Sorry for the confusion!

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
How to delete a member from a SET columnBenjamin Pflugmann7 Jul
  • Re: How to delete a member from a SET columnMartin Ramsch15 Sep
    • Re: How to delete a member from a SET columnJames Manning15 Sep
      • Re: How to delete a member from a SET columnMartin Ramsch16 Sep
        • Re: How to delete a member from a SET columnMartin Ramsch16 Sep
          • Re: How to delete a member from a SET columnJames Manning17 Sep
            • Re: How to delete a member from a SET columnMartin Ramsch17 Sep
              • Re: How to delete a member from a SET columnJames Manning17 Sep
                • Re: How to delete a member from a SET columnMartin Ramsch17 Sep
                  • placeholdersjice17 Sep
                    • Re: placeholdersBob Kline17 Sep
                  • Re: How to delete a member from a SET columnJames Manning17 Sep
        • Re: How to delete a member from a SET columnJames Manning17 Sep
          • Re: How to delete a member from a SET columnMartin Ramsch17 Sep