Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Why do I always have funky issues with SQL in FM? Here's another...???


This topic is 6724 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to build a very simple login for a web page. I've created a table in FM to store username's and password's. Right now I have 2 records in there:

testUser1 testPW1

testUser2 testPW2

When I create a recordset like:

SELECT * FROM POWebUsers

I indeed get a recordset with both records in it. However, if I try and check for values in username and password to authenticate a user:

SELECT * FROM POWebUsers WHERE username = 'testUser1' AND password = 'testPW1'

I get an empty recordset!? What on earth is going on here that's causing me to waste so much time on such a simple task? Any information would be greatly appreciated. Thanks!

Posted

SELECT * FROM POWebUsers WHERE password <> 'testPW1'

successfully returns only the testUser2 record.

Then I try:

SELECT * FROM POWebUsers WHERE username <> 'testUser2'

And I get both records returned! I'm as confused as I've ever been.

Posted

Ok, now I've switched the field names from username and password to varUsername and varPassword. Then when I try

WHERE varUsername <> 'testUser2'

it works. However, I still can't make the whole thing work:

WHERE varUsername = 'testUser2' AND varPassword = 'testPW2'

This topic is 6724 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.