Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

code check please

Community Beginner ,
Nov 05, 2009 Nov 05, 2009

Hi

have a mysql databse which includes colums: UserSex, UserEthnicity,UserAge, UserArea etc.

I've created a form using spry select to search the database for any combination or age, sex ethnicity etc.

When I add four test records to the database and then run the search page in the drop down box  I see (for example) Male female,male female so it's listing the entry for every record.

A google search told me that in the record set I had to use SELECT DISTINCT

so I edited the record set as below

SELECT UserEthnicity, UserAge, UserTypes, UserArea
FROM users

But this hasn't stopped the duplicates.

Is this coding correct?

thanks

Ian

TOPICS
Server side applications
237
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 05, 2009 Nov 05, 2009
LATEST

Sorry pasted the wrong code

SELECT DISTINCT UserEthnicity, UserAge, UserTypes, UserArea
FROM users

Ian

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines