Dark Lord Posted October 14, 2003 Share Posted October 14, 2003 I got as far as: Select * from `Persons` WHERE `vn` LIKE \'$vn\' but that only selects the ones that are equal to $vn and not the ones starting with $vn... how do i get it to select the ones starting with $vn??? Link to comment https://forums.phpfreaks.com/topic/1162-how-do-i-select-all-records-where-something-starts-with-an-a/ Share on other sites More sharing options...
Kriek Posted October 14, 2003 Share Posted October 14, 2003 Use the wildcard % characters. SELECT * FROM Persons WHERE vn LIKE \'%$vn%\'; Link to comment https://forums.phpfreaks.com/topic/1162-how-do-i-select-all-records-where-something-starts-with-an-a/#findComment-3911 Share on other sites More sharing options...
michael yare Posted October 20, 2003 Share Posted October 20, 2003 If he does that Jon, he will get everything with $vn in - starting, middle or ending. He wants: LIKE \'$vn%\' Link to comment https://forums.phpfreaks.com/topic/1162-how-do-i-select-all-records-where-something-starts-with-an-a/#findComment-3992 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.