On 1/23/08, Brian Kotek <[EMAIL PROTECTED]> wrote:
> Yes this is the real problem. You're referencing the table by the wrong name
> in the where clause.

good catch Brian.  We're like home inspects.. find one bug and point
it out and we've done our job =)

(*NEVER* fix things like leaky faucets and such PRIOR to a home inspection)

Rick

>
> On Jan 23, 2008 12:42 PM, Dominic Watson <[EMAIL PROTECTED]>
> wrote:
>
> > >
> > > <cfquery name="getUser" datasource="#dsn#">
> > >    SELECT *
> > >    FROM Users
> > >    WHERE (getUser.UserLogin = '#Form.UserLogin#')
> > >      AND (getUser.Password' = '#Form.Password#')
> > > </cfquery>
> >
> >
> > A few things:
> >
> > 1. The parenthesis are unneccessary
> > 2. getUser is not a database object referred to in the query. This should
> > be
> > replaced with 'Users', the table that you are referring to in the query.
> > The
> > query name is a variable for you ColdFusion template to use once the query
> > has returned its results. The database server has no knowledge of it.
> > 3. cfqueryparam. Do a search at HoF for it if you don't know about it!
> >
> > So, your query could/should look like:
> >
> > <cfquery name="getUser" datasource="#dsn#">
> >   SELECT *
> >   FROM Users
> >   WHERE Users.UserLogin = <cfqueryparam cfsqltype="cf_sql_varchar"
> > value="#Form.UserLogin#">
> >     AND Users.Password = <cfqueryparam cfsqltype="cf_sql_varchar"
> > value="#Form.Password#">
> > </cfquery>
> >
> > Dominic
> >
> > --
> > Blog it up: http://fusion.dominicwatson.co.uk
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297177
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to