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 Link to comment https://forums.phpfreaks.com/topic/101077-solved-mysql-issues/ 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. Link to comment https://forums.phpfreaks.com/topic/101077-solved-mysql-issues/#findComment-516850 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 Link to comment https://forums.phpfreaks.com/topic/101077-solved-mysql-issues/#findComment-516854 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? Link to comment https://forums.phpfreaks.com/topic/101077-solved-mysql-issues/#findComment-516858 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? Link to comment https://forums.phpfreaks.com/topic/101077-solved-mysql-issues/#findComment-516860 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. Link to comment https://forums.phpfreaks.com/topic/101077-solved-mysql-issues/#findComment-516861 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.