Try with GROUP_CONCAT(ScriptName) http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_group-concat
2009/6/12 bruce <bedoug...@earthlink.net> > Hi... > > I have the following... > > mysql> INSERT INTO ParseScriptTBL VALUES > -> ('auburnCourse.py',40,1,1), > -> ('auburnFaculty.py',40,2,2), > -> ('uofl.py',2,1,3), > -> ('uky.py',3,1,4), > -> ('ufl.py',4,1,5) > -> ; > Query OK, 5 rows affected (0.00 sec) > Records: 5 Duplicates: 0 Warnings: 0 > mysql> select * from ParseScriptTBL as p join universityTBL as u on > u.ID=p.CollegeID where u.ID=40; > +------------------+-------+----------+--------+----+ > | ScriptName | CollegeID | pTypeID | ScriptID | ID | > +------------------+-------+----------+--------+----+ > | auburnCourse.py | 40 | 1 | 1 | 40 | > | auburnFaculty.py | 40 | 2 | 2 | 40 | > +------------------+-----------+------+--------+----+ > 2 rows in set (0.00 sec) > > > i'd like to have a query that gives me both scripts for the college in the > same row... > keeping in mind that some colleges will have no scripts, some will have > only > one, and some will have both... > > i've tried to do the query, and added a "group by CollegeID' with no luck.. > > so how can i combine the two rows to get a single row?? > > > thanks > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=maxb...@gmail.com > >