spiceydog Posted July 6, 2008 Share Posted July 6, 2008 I have a simple search that is supposed to search a MySQL table and then return the data. The problem is that there is alot of repetive lines that I don't want to be displayed in the result. So what I need to happen is for only like the first line where (for example) title=wow What I don't want: green | house | two | yes | 1991 yellow | house | one | yes | 1973 blue | house | one | no | 1995 green | trailer | one | no | 2001 blue | trailer | one | yes | 2000 What I do want displayed: green | house | two | yes | 1991 green | trailer | one | no | 2001 Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/113409-solved-posting-only-one-line-of-data-where-multiple-results-are-possible/ Share on other sites More sharing options...
dannyb785 Posted July 6, 2008 Share Posted July 6, 2008 What's repetitive about the first "what i dont want" example? Like, what are you trying to filter out? Link to comment https://forums.phpfreaks.com/topic/113409-solved-posting-only-one-line-of-data-where-multiple-results-are-possible/#findComment-582733 Share on other sites More sharing options...
mwasif Posted July 6, 2008 Share Posted July 6, 2008 I can only think of using GROUP BY the way you have explained your problem. Link to comment https://forums.phpfreaks.com/topic/113409-solved-posting-only-one-line-of-data-where-multiple-results-are-possible/#findComment-582738 Share on other sites More sharing options...
spiceydog Posted July 6, 2008 Author Share Posted July 6, 2008 thanks mwaslf! i just couldnt remember the word. Link to comment https://forums.phpfreaks.com/topic/113409-solved-posting-only-one-line-of-data-where-multiple-results-are-possible/#findComment-582747 Share on other sites More sharing options...
mwasif Posted July 6, 2008 Share Posted July 6, 2008 You are welcome Link to comment https://forums.phpfreaks.com/topic/113409-solved-posting-only-one-line-of-data-where-multiple-results-are-possible/#findComment-582750 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.