From: "Michael Kimsal" <[EMAIL PROTECTED]> > Philip J. Newman wrote: > > > Don't know is this is a Mysql problem or PHP, but I have a table with 100 records in it. One of the field names is $iName. > > > > When listing all the records I want only the 1st Uneak value to be displayed. > > > > For excample > > > > if values where, Bob, Jan, Mike, James, Bob, James, James, Mike ... > > > > I would like to call: Bob, Jan, Mike, James ... Any Idenas > > > > > I suspect you mean the mysql field name is 'iName', not '$iname' ($iName > being the PHP variable name). > > try > > select distinct(iName) from tablename > > and loop through those result sets.
Almost right. DISTINCT is not a SQL function: select distinct iName from tablename would be the correct syntax. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

