kamal213 Posted September 19, 2012 Share Posted September 19, 2012 Hi guys, how can you get sql to select all cities in your database beginning with the letter C for example? Thanks alot Link to comment https://forums.phpfreaks.com/topic/268555-how-to-search-by-initials/ Share on other sites More sharing options...
Jessica Posted September 19, 2012 Share Posted September 19, 2012 SELECT * FROM tbl WHERE field LIKE ('C%'); There are also string functions in mysql. Use the manual. And stop smoking so much pot so you can actually learn this stuff. Link to comment https://forums.phpfreaks.com/topic/268555-how-to-search-by-initials/#findComment-1379245 Share on other sites More sharing options...
kamal213 Posted September 19, 2012 Author Share Posted September 19, 2012 Thanks very much it worked, problem solved Link to comment https://forums.phpfreaks.com/topic/268555-how-to-search-by-initials/#findComment-1379250 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.