>
> <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:297150
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4