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. Quote 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'"; Quote 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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/243044-where-clause/#findComment-1248290 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.