.oO(bikeman01)
>I have a recordset which produces the following output
from a mysql db:
>
> record1 - Car1 - Ford - Fiesta
> record2 - Car1 - Colour - Blue
> record3 - Car1 - Price - 2995
> recordx - Car2 - VW - Golf
> recordy - Car2 - Colour - Red
> recordz - Car2 - Price - 4995
This looks a bit strange and not like a proper DB design. Can
you post
some table details (the CREATE statement)?
> I want to write an sql statement which combines all the
rows relevant to each
>vehicle and output them in the same row e.g.:
>
> Record1 - Car1 - Ford - Fiesta - Blue - 2995
> Recordx - Car2 - VW - Golf - Red - 4995
With a better DB design it would be as simple as
SELECT
id, brand, type, color, price, ...
FROM
...
For your current table a GROUP_CONCAT clause might help. See
the MySQL
manual for details.
Micha