Keith,

I agree that would be a good option to change the table. Unfortunately, that's not an option at this point. I don't control the schema. Thanks for the suggestion anyway.

Albert Padley


On Jun 14, 2006, at 3:59 PM, Keith Roberts wrote:

Hi Chris.

I cannot see how it can be done with the current table
schema. Maybe you need to redeclare your table so the values
in the value column are more distinct?

What is value supposed to contain anyway? First name, last
name and email address?

What about a structure like:

id | userid | ipf_1 | ipf_2 | ipf_3
1      2     John    Smith   email_addy

Which will allow you to retrieve all the values you want
from the table as one row without having to repeat the
userid column?

HTH

Keith Roberts

In theory, theory and practice are the same;
in practice they are not.

On Wed, 14 Jun 2006, Chris White wrote:

To: mysql@lists.mysql.com
From: Chris White <[EMAIL PROTECTED]>
Subject: Re: Problem With Join Syntax

On Wednesday 14 June 2006 10:55 am, Albert Padley wrote:
A typical set of data looks like this:

id | inputfieldid | userid | value
1          1           2     John
2          2           2     Smith
3          3           2     [EMAIL PROTECTED]

I am trying to come up with a query to return all the `values` of a
single userid in a single row. I've checked my books, the manual and
tried every type of join I can think of without success. I'd
appreciate some direction.

This sounds like somewhat of a strange requirement. Why do they need to be in a single row? There MIGHT be a way to do it with stored procedures, I'm just
not sure how..

Thanks.

Albert Padley

--
Chris White
PHP Programmer/DB Fighter
Interfuel

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? [EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? [EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to