Re: MySQL query or Filter code

From: Date: Sat, 09 Sep 2000 20:04:09 +0000
Subject: Re: MySQL query or Filter code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16006@lists.php.net to get a copy of this message
hi, just use DISTINCT in your case: SELECT DISTINCT type FROM code; andreas Hi everybody, I've got a table named code. In this table there is a column named type. I'm gettting the different types from the database, and putting them on a website. Sometimes, there's more than one entry for the same thing in type. Example: name type id Tyler Longren HTTP 1 EditDelete Tyler Longren Database 2 EditDelete Tyler Longren Filesystem 3 EditDelete Tyler Longren Filesystem 4 EditDelete See how there's 2 entries for the Filesystem type? How can I make it so it only puts one of those out onto the webpage? So when you view the page it looks like this: HTTP Database Filesystem Instead of: HTTP Database Filesystem Filesystem Can I do this with just a MySQL query or would I have to filter my code somehow? If I have to filter the code, could you provide an example? Thanks. Regards, Tyler Longren

« previous php.general (#16006) next »