Yeah, you should really change the way the database is setup but you
could also do something like this. Have perl return an array and just do
a foreach on the array and that will give you all the values of each
column on the row, without you knowing how many rows there are.

Even if your not using perl you can still do it in other languages.

On 31 Jan 2001 12:10:36 -0800, Eric Fitzgerald wrote:
> Change the way it's stored in the table.
> 
> Seriously, if the data is stored in a single row, there is no way via SQL
> (not defined in standards, not available in any SQL server implementation
> I've seen either), then the program has to convert that into columns.  The
> standard mysql utility is capable of doing this, and you can do it in your
> program.
> 
> If you want to use the mysql CLI, do something like this:
> mysql --execute='SELECT fields FROM table WHERE condition' --vertical dbname
> 
> Otherwise write your program to do it.
> 
> ----- Original Message -----
> From: "leo.putz" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 31, 2001 11:50 AM
> Subject: Once again ... row to column conversion
> 
> 
> > Sorry for having to post the same problem a second time -
> > but by now I'm really at a loss.
> > Is there really no one out there to give me a hint?
> >
> > I need the output of a query result (all query information is in one
> > row) in one column (!). So, e.g., if you have all temperature lows in
> > one row, how can I retrieve the data in form of one column?
> >
> > THANKS!
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to