taith Posted April 14, 2008 Share Posted April 14, 2008 hey everyone $q=mysql_query("SELECT * FROM `products` WHERE `price`<='100'") or die(mysql_error()); that should find every product that's under 100? no? the price column is a text field, but holding only a price... and for some reason, that query is not finding any of the products under 100 Quote Link to comment Share on other sites More sharing options...
chigley Posted April 14, 2008 Share Posted April 14, 2008 Depending on the field type, try removing the '' quotes from around the 100. Quote Link to comment Share on other sites More sharing options...
taith Posted April 14, 2008 Author Share Posted April 14, 2008 aha! too simple! thank you thank you thank you Quote Link to comment Share on other sites More sharing options...
chigley Posted April 14, 2008 Share Posted April 14, 2008 Off-topic, but, remember me from about a year ago Taith? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted April 14, 2008 Share Posted April 14, 2008 Why are you using a text field to store a price anyway? Quote Link to comment Share on other sites More sharing options...
chigley Posted April 14, 2008 Share Posted April 14, 2008 Why are you using a text field to store a price anyway? I don't think he is. His query makes it look like he was though, which was the mistake in the OP. Quote Link to comment 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.