imperialized Posted March 4, 2008 Share Posted March 4, 2008 I tried to do a search for this, but it didnt show any results. Its easy what I am trying to do, I just can't figure it out. Basically, I am working on my Member_list and i want to provide an alphabet of links (clickable by the user) and will display only the users whose name starts with that letter Such as: member_list.php?letter=A displays: Amanda Alex Aaron For letter=B Brandon Bernard you catch my drift, I just can't seem to figure it out :-\ Link to comment https://forums.phpfreaks.com/topic/94332-select-from-a-database-by-first-character-of-a-string/ Share on other sites More sharing options...
discomatt Posted March 4, 2008 Share Posted March 4, 2008 Try this SELECT FROM `table` WHERE `string` LIKE 'a%' Link to comment https://forums.phpfreaks.com/topic/94332-select-from-a-database-by-first-character-of-a-string/#findComment-483101 Share on other sites More sharing options...
imperialized Posted March 4, 2008 Author Share Posted March 4, 2008 Works perfectly. I had tried that, but I had a typo in my code and it was returning 0 results. Thanks! Link to comment https://forums.phpfreaks.com/topic/94332-select-from-a-database-by-first-character-of-a-string/#findComment-483126 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.