Hi everyone, new to this forum so if I am a little indelicate please forgive me.
I have searched the forums but cannot find this answered currently:
I have written some PHP that queries a mySQL database. My local version runs fine but when I upload the files it fails.
I have one field called 'pass' that is a PASSWORD() defined password.
I have then undertaken a series of tests and found the following out.
If I select PASSWORD('password') I get an encrypted code that matches the field entry for the user whose password is 'password'.
Yet if I run the SQL SELECT * FROM cmsusers WHERE pass = PASSWORD('password') then I get a zero return - which is wrong since I can see they match.
I note that the type is varchar and the length is restricted to 20. Could this be due to truncation and if so, how do I avoid this?