Jump to content

problem with selection from two tables!


Recommended Posts

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


This topic is now archived and is closed to further replies.

  • Create New...