ohdang888 Posted March 31, 2008 Share Posted March 31, 2008 how would i do that? i'm not asking for the script, just the direction to how i would do this.... Thanks Link to comment https://forums.phpfreaks.com/topic/98735-order-by-relevancy/ Share on other sites More sharing options...
sstangle73 Posted March 31, 2008 Share Posted March 31, 2008 i had something similiar to this what i ended up doing what assigning each value a number when i added it to the db then i could just do ascending or descending Link to comment https://forums.phpfreaks.com/topic/98735-order-by-relevancy/#findComment-505252 Share on other sites More sharing options...
maxudaskin Posted March 31, 2008 Share Posted March 31, 2008 <?php $terms = $_POST['search']; $query = mysql_query("SELECT * FROM `table` WHERE `column` LIKE '$terms'"); while($row = mysql_fetch_array($query)){ echo "$row['column']"; echo "<br />"; } ?> Search Term: egg Results: eggnogg eggs eggmcmuffin egg Link to comment https://forums.phpfreaks.com/topic/98735-order-by-relevancy/#findComment-505265 Share on other sites More sharing options...
sstangle73 Posted March 31, 2008 Share Posted March 31, 2008 max thats not ordering it by relevancy thats just searching all that contain egg Link to comment https://forums.phpfreaks.com/topic/98735-order-by-relevancy/#findComment-505266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.