So I have a table like:
[id | firstName | lastName | type | etc ]
and it holds a list of people's first, last names, and information about what they made. My problem is that I'd have like
[ 1 | person_A | something | painting | etc]
[ 2 | person_A | something | something | etc]
[ 3 | person_A | something | else | etc]
because they've made more than one thing. I'd like to just get one row with person_A, but has everything in the type column.
Would it be a good idea to get everything (SELECT * FROM stuff) and then with a loop in php, add them to an array if they're not already in it, and if they are, just add onto it. Eventually turning into
$peoples = array("id of row" => array("first name","last name","etc","type" => array("painting","something","else")),/*so on*/);
or some trick with mysql?
Solved: use DISTINCT!