Gruzin Posted December 3, 2006 Share Posted December 3, 2006 Hi guys,I want to pull out the info form db using first letter. For example I want to display all records begining on A or B. I've tryed something like this, but it displays all the records....[code]$sql = mysql_query("SELECT * FROM Mater WHERE MatName LIKE 'a%'");while($row = mysql_fetch_array($sql)){echo $row['MatName']."<br>";}[/code]Thanks for your help,George Link to comment https://forums.phpfreaks.com/topic/29314-select-data-from-db-using-first-letter-solved/ Share on other sites More sharing options...
chiprivers Posted December 3, 2006 Share Posted December 3, 2006 Looks OK to me! Link to comment https://forums.phpfreaks.com/topic/29314-select-data-from-db-using-first-letter-solved/#findComment-134364 Share on other sites More sharing options...
Gruzin Posted December 3, 2006 Author Share Posted December 3, 2006 Sorry, I've fixed that :) Link to comment https://forums.phpfreaks.com/topic/29314-select-data-from-db-using-first-letter-solved/#findComment-134366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.