![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hi, Sorry about the off topic post, but my news server doesn't carry any decent MySQL newsgroups and it seems that many people using PHP are also using MySQL so I thought someone might know. My question concerns finding duplicates in a field in my database table. The field contains a URL and I can see that there are some duplicates as count(URI) and count(distinct URI) give different results. What I wondered is if there is a way for me to list only these duplicates. Something along the lines of the following, although this doesn't work select count(URI),URI from main group by URI where count(URI) > 1 Any ideas? tia Chris | |||
|
| Advertisements |
| | #2 | ||
| On Thu, 10 Jul 2003 11:43:54 +0100, Chris wrote: > select count(URI),URI from main group by URI where count(URI) > 1 Shouldn't this be: select count(URI) as cnt,URI from main group by URI where cnt > 1 or more likely select count(URI),URI from main group by URI having count(URI) > 1 Cheers, Andy | |||
|
| | #3 | ||
| On Thu, 10 Jul 2003 12:50:41 +0100, "Andy Jeffries" <news@andyjeffries.remove.co.uk> wrote: >select count(URI),URI from main group by URI having count(URI) > 1 > You're a star mate. That worked a treat. Cheers, C | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: mysql, question |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| newbie PHP Forms Mysql question. | MeNotHome | PHP | 0 | 07-01-2007 3:15 PM |
| Mysql commercial licence question | Adam Lipscombe | Database | 0 | 06-10-2007 12:23 AM |
| phpdev mysql question | Greg | Database | 1 | 06-10-2007 12:23 AM |
| MySQL Query Cache Not Working: MySQL 5 / Windows XP | Good Man | Database | 0 | 05-31-2007 8:46 PM |
| MYSQL 4.0 => 4.1 | ja | Database | 1 | 05-31-2007 8:38 PM |
| Featured Websites | ||||
|