dudejma Posted July 28, 2011 Share Posted July 28, 2011 I'm trying to get the number of rows to be echoed, but I get this error: Unknown column 'mymd5password' in 'where clause' Does anyone know what this means? Here's the where clause: $sql = "SELECT * FROM test WHERE password=$password"; Thanks! Edit: My variable $password is already in md5 form. I'm taking it from a form. Link to comment https://forums.phpfreaks.com/topic/243044-where-clause/ Share on other sites More sharing options...
AyKay47 Posted July 28, 2011 Share Posted July 28, 2011 you need to wrap your value in quotes... $sql = "SELECT * FROM test WHERE password='$password'"; Link to comment https://forums.phpfreaks.com/topic/243044-where-clause/#findComment-1248284 Share on other sites More sharing options...
dudejma Posted July 28, 2011 Author Share Posted July 28, 2011 Wow, how'd I miss that. Thanks AyKay47! I feel smart now. Link to comment https://forums.phpfreaks.com/topic/243044-where-clause/#findComment-1248289 Share on other sites More sharing options...
AyKay47 Posted July 28, 2011 Share Posted July 28, 2011 Wow, how'd I miss that. Thanks AyKay47! I feel smart now. Link to comment https://forums.phpfreaks.com/topic/243044-where-clause/#findComment-1248290 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.