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? Link to comment https://forums.phpfreaks.com/topic/74381-solved-php-if-statement/ 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; Link to comment https://forums.phpfreaks.com/topic/74381-solved-php-if-statement/#findComment-375806 Share on other sites More sharing options...
le007 Posted October 22, 2007 Author Share Posted October 22, 2007 Ok, thanks Link to comment https://forums.phpfreaks.com/topic/74381-solved-php-if-statement/#findComment-375828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.