centenial Posted June 30, 2006 Share Posted June 30, 2006 Hi,I have a field called "price" in one of my MySQL database tables. I want to select ALL records between $1,000 & $25,000 - How can I do this?Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/13346-select-records-between-2-numbers/ Share on other sites More sharing options...
karthikeyan_coder Posted July 1, 2006 Share Posted July 1, 2006 "SELECT * from `table_name` WHERE (`price` > '1000') AND (`price` < '25000')im not sure about the brackets... so try this one also (`price` > '1000' AND `price` < '25000') lol... trial and error method. 8) Quote Link to comment https://forums.phpfreaks.com/topic/13346-select-records-between-2-numbers/#findComment-51469 Share on other sites More sharing options...
centenial Posted July 1, 2006 Author Share Posted July 1, 2006 Thanks!Do the numbers in the "price" field have to be formatted in any particular way? Can I include dollar signs and commas in that field? Quote Link to comment https://forums.phpfreaks.com/topic/13346-select-records-between-2-numbers/#findComment-51475 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.