plodos Posted August 24, 2008 Share Posted August 24, 2008 select name,title from person output record no: 300 title : aaaaaaaaaaaaaaaaaaaa name: George Borks record no: 301 title : aaaaaaaaaaaaaaaaaaaa name: George Borks record no: 302 title : aaaaaaaaaaaaaaaaaaaa name: George Borks .......... ........ ....... For exapmle, George Borks registered 3 times....and when I listed data, there are 3 records, It is not good to see repeated records on the web page.. How can I listed only one ( without repeated George Bush), Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 24, 2008 Share Posted August 24, 2008 You should prevent duplicate input into the table if you don't need them but to fix the solution now you can try adding on to your WHERE clause a UNIQUE(field name) such as Select name, title from `person` Where UNIQUE(Name) Quote Link to comment Share on other sites More sharing options...
plodos Posted August 24, 2008 Author Share Posted August 24, 2008 this is working..... $data = mysql_query("select * from person where no='1' ORDER BY person_id DESC"); problem is here $data = mysql_query("select * from person where no='1' AND UNIQUE(email) ORDER BY person_id DESC"); I got an error like : mysql fetch array worning, supplied argument like that... How can I solve the problem? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 25, 2008 Share Posted August 25, 2008 take the query into phpmyadmin and work on it Quote Link to comment Share on other sites More sharing options...
fenway Posted August 25, 2008 Share Posted August 25, 2008 You should prevent duplicate input into the table if you don't need them but to fix the solution now you can try adding on to your WHERE clause a UNIQUE(field name) such as Select name, title from `person` Where UNIQUE(Name) That's not valid syntax. take the query into phpmyadmin and work on it So it won't work. As for the actual question, you need to decide which one of the three records you want to use. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.