le007 Posted October 22, 2007 Share Posted October 22, 2007 $sql = "SELECT * FROM `cheap_tabl` WHERE `property_type` like '$prop_type' and `area` like '$county' and `town_city` like '$town' and `price` > ($minprice + 1) and `price` < ($maxprice + 1) and `bedrooms` > ($minbeds - 1) and `bedrooms` < ($maxbeds + 1) ORDER BY cheap_id DESC LIMIT $from, $max_results"; $sirsql = mysql_query($sql) or die(mysql_error()); I'm playing around with this to just show results where price is 50 `price` like '50' isn't working? Quote Link to comment Share on other sites More sharing options...
trq Posted October 22, 2007 Share Posted October 22, 2007 Firstly, this has nothing to do with a php if statment. In fact, it has little to do with php, its more an sql question. Don't use LIKE unless you need to. SELECT * FROM tbl WHERE price = 50; Quote Link to comment Share on other sites More sharing options...
le007 Posted October 22, 2007 Author Share Posted October 22, 2007 Ok, thanks 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.