luckiano Posted March 20, 2010 Share Posted March 20, 2010 hi everyone i'm havin a problem with selecting data from two tables in a single databasei have a login page that looks like thislogin.cfm <cfform action="index.cfm" method="post"><cfinput type="text" name="username"><cfinput type="text" name="password"><cfinput type="submit" name="submit"></cfform> and the index.cfm page looks like thisindex.cfm <cfquery name="qryrDe" datasource="mydsn> SELECT UserName, password, surName, middleName FROM Users, results WHERE UserName = <cfqueryparam value="#trim(form.Username)#" CFSQLType="CF_SQL_VARCHAR"> AND password = <cfqueryparam value="#trim(form.password)#" CFSQLType="CF_SQL_VARCHAR"> </cfquery> it is always throwing an error that the username could be from any of the two tables. please help Link to comment Share on other sites More sharing options...
luckiano Posted March 21, 2010 Author Share Posted March 21, 2010 okay i got where the mistake was. i got it solved Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.