Jump to content
Sign in to follow this  
luckiano

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...