I have a mysql db query that I'd like to take and condense into a single row. The output is currently two rows and will only ever be two rows. The reason I am getting two rows in the first place is because there will always be a primary and a secondary phone number associated with my result.
Since all of the data is exactly the same for both rows with the exception of the phone type (ptype) and second phone number, I'd like to just take those two columns and append them to the forst row.
I know this can be done but I can't remember how to do it.
Here is the code I am using:
SELECT
c.name,
c.address1,
p.ptype,
p.phone
FROM
customer AS c
Inner Join customeremp AS e ON c.customer_id = e.customer_id
Inner Join customerphone AS p ON e.customer_seq = p.customer_seq
WHERE
c.customer_id = '1'