Scooby08 Posted February 1, 2009 Share Posted February 1, 2009 Can anybody tell why this would be returning two records for each item found?? <?php $query = "SELECT name, symbol "; $query .= "FROM pfs "; $query .= "WHERE name LIKE \"%$symbol%\" "; $query .= "ORDER BY symbol"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['symbol']; echo $row['name']."<br />"; } ?> Link to comment https://forums.phpfreaks.com/topic/143359-solved-sql-search-returning-doubles/ Share on other sites More sharing options...
Snart Posted February 1, 2009 Share Posted February 1, 2009 Can you show us the contents of the table and the result you see on the screen? Link to comment https://forums.phpfreaks.com/topic/143359-solved-sql-search-returning-doubles/#findComment-751889 Share on other sites More sharing options...
Scooby08 Posted February 1, 2009 Author Share Posted February 1, 2009 Ahh never mind.. Thanks for pointing me to the table Snart.. I have all records twice and didn't realize it.. Link to comment https://forums.phpfreaks.com/topic/143359-solved-sql-search-returning-doubles/#findComment-751891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.