rockindano30 Posted May 15, 2008 Share Posted May 15, 2008 Hello all i'm having a little difficulties with this sql syntax. SELECT * FROM users WHERE Uname='user1' and Pword='user1'; with the above sql syntax it returns 0 records and with SELECT * FROM users WHERE Uname='user1'; it returns one record. now i have two records in this database but having this problem. please help. Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/ Share on other sites More sharing options...
BlueSkyIS Posted May 15, 2008 Share Posted May 15, 2008 is there any record in the database where Uname='user1' and Pword='user1'? Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/#findComment-542146 Share on other sites More sharing options...
rockindano30 Posted May 15, 2008 Author Share Posted May 15, 2008 yes, there are two records that im using for testing. it does display it the record with select * from users where Uname='user1'; but not with select * from users where Uname='user1' and Pword='user1'; Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/#findComment-542149 Share on other sites More sharing options...
rockindano30 Posted May 15, 2008 Author Share Posted May 15, 2008 or it doesn't even display any records also if i use select * from users where Pword='user1'; im using MD5() to encrypt the Pword when its being add into db Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/#findComment-542152 Share on other sites More sharing options...
rockindano30 Posted May 15, 2008 Author Share Posted May 15, 2008 why won't this give me or show me my records? SELECT * FROM users WHERE Uname='{$Uname}' AND Pword='{$Pword}'; Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/#findComment-542187 Share on other sites More sharing options...
rockindano30 Posted May 15, 2008 Author Share Posted May 15, 2008 no help? Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/#findComment-542194 Share on other sites More sharing options...
revraz Posted May 15, 2008 Share Posted May 15, 2008 You know, making another post about the same topic doesn't help, it actually makes it worse. Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/#findComment-542257 Share on other sites More sharing options...
DarkWater Posted May 15, 2008 Share Posted May 15, 2008 You need to check the MD5 of the entered password with the MD5 in the database. So, run MD5() on the incoming password and use that in the SQL. Link to comment https://forums.phpfreaks.com/topic/105793-help-selecting-records/#findComment-542258 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.