Re: [PHP] SQL field problem

2002-07-10 Thread Chris Hewitt
Chris, select distinct kat from tablename; Its in the mysql manual, 6.4.1 SELECT Syntax. HTH Chris [EMAIL PROTECTED] wrote: >Hello > >I have a problem with mysql.I create a table with a field "kat".In this field are >entries like this : > >Light >Dark >Dark >Light >Robot >Find >Dark >Light

Re: [PHP] SQL field problem

2002-07-10 Thread Alberto Serra
ðÒÉ×ÅÔ! [EMAIL PROTECTED] wrote: > You see that all entries are not unique.So i want to list as output all entries but >only once.If the word "Dark" is in the table 6 times php should output dark only 1 >time. > How should i solve this problem ? select distinct and RTFM :) ÐÏËÁ áÌØÂÅÒÔÏ ëÉ

Re: [PHP] SQL field problem

2002-07-10 Thread Rick Emery
SELECT DISTINCT kat FROM mytable; Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 10, 2002 12:40 PM Subject: [PHP] SQL field problem Hello I have a problem with mysql.I create a table with a field "kat".In t

Re: [PHP] SQL field problem

2002-07-10 Thread Chris Earle
message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > You can refer to fields by their number. > > > > $Row[3]; > > > > -Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 10, 2002 10:40 AM > > To:

Re: [PHP] SQL field problem

2002-07-10 Thread Chris Earle
ssage [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You can refer to fields by their number. > > $Row[3]; > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 10, 2002 10:40 AM > To: [EMAIL PROTECTED] > Subject

Re: [PHP] SQL field problem

2002-07-10 Thread Martin Clifford
SELECT DISTINCT kat FROM tablename; should work. Martin >>> <[EMAIL PROTECTED]> 07/10/02 01:40PM >>> Hello I have a problem with mysql.I create a table with a field "kat".In this field are entries like this : Light Dark Dark Light Robot Find Dark Light You see that all entries are not uniqu

Re: [PHP] SQL field problem

2002-07-10 Thread Tyler Longren
I think you want to use group by: SELECT * FROM table GROUP BY kat; -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Wed, 10 Jul 2002 19:40:11 +0200 <[EMAIL PROTECTED]> wrote: > Hello > > I have a problem with mysql.I create a table with a field "kat".In

RE: [PHP] SQL field problem

2002-07-10 Thread Lazor, Ed
You can refer to fields by their number. $Row[3]; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 10:40 AM To: [EMAIL PROTECTED] Subject: [PHP] SQL field problem Hello I have a problem with mysql.I create a table with a field &quo

[PHP] SQL field problem

2002-07-10 Thread mail
Hello I have a problem with mysql.I create a table with a field "kat".In this field are entries like this : Light Dark Dark Light Robot Find Dark Light You see that all entries are not unique.So i want to list as output all entries but only once.If the word "Dark" is in the table 6 times php