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

CFML duplicate entries

Guest
Jul 03, 2006 Jul 03, 2006
Hello,

I am having trouble, I can't get the CFML to not duplicate the Users in my table. Except the user at the top of my table. but it won’t validate the rest of the users I have on my Database just the one at the top.

<cfquery name="checkusers" datasource="ukgl.co.uk">
SELECT UserName
FROM users
</cfquery>

<cfif #Form.Username# is "#checkusers.Username#"><cfoutput>#Form.Username# is already in use by another User</cfoutput><cfoutput>#checkusers.Username#</cfoutput><cfelse>

! Insert Code !

</cfif>

There’s the code I have.

Any help is greatly appreciated.

Thanks
TOPICS
Server side applications
372
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

correct answers 1 Correct answer

LEGEND , Jul 05, 2006 Jul 05, 2006
You are grabbing your entire membership list with the query but then not
using a cfoutput hence you are getting only the first record.

Change the SQL statement to

SELECT UserName
FROM users
WHERE UserName = '#Form.Username#'

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"Hugh Neale" <webforumsuser@macromedia.com> wrote in message
news:e8bcii$im1$1@forums.macromedia.com...
> Hello,
>
> I am having...
Translate
Guest
Jul 05, 2006 Jul 05, 2006
*bump* someone help ... please
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
LEGEND ,
Jul 05, 2006 Jul 05, 2006
You are grabbing your entire membership list with the query but then not
using a cfoutput hence you are getting only the first record.

Change the SQL statement to

SELECT UserName
FROM users
WHERE UserName = '#Form.Username#'

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"Hugh Neale" <webforumsuser@macromedia.com> wrote in message
news:e8bcii$im1$1@forums.macromedia.com...
> Hello,
>
> I am having trouble, I can't get the CFML to not duplicate the Users in my
> table. Except the user at the top of my table. but it won?t validate the
> rest
> of the users I have on my Database just the one at the top.
>
> <cfquery name="checkusers" datasource="ukgl.co.uk">
> SELECT UserName
> FROM users
> </cfquery>
>
> <cfif #Form.Username# is "#checkusers.Username#"><cfoutput>#Form.Username#
> is
> already in use by another
> User</cfoutput><cfoutput>#checkusers.Username#</cfoutput><cfelse>
>
> There?s the code I have so far.
>
> Any help is greatly appreciated.
>
> Thanks
>
>


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
Guest
Jul 06, 2006 Jul 06, 2006
LATEST
god im stupid
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