timlondon Posted February 9, 2007 Share Posted February 9, 2007 If I'm looking for all instances of "alpha" (as in alpha01, alpha02, alphawhatever) from the field named "account" is there a way I can use a wildcard such as alpha* in my select statement? I'm specifically trying to do it by using the following but I don't know how: $sql = mysql_query("SELECT * FROM user WHERE account='$member' AND $scanfield='$scanarea'"); for the above $member = "alpha" and $scanfield = country and $scanarea = "en". Quote Link to comment https://forums.phpfreaks.com/topic/37768-wildcards/ Share on other sites More sharing options...
Jessica Posted February 9, 2007 Share Posted February 9, 2007 $member LIKE ('alpha%') Quote Link to comment https://forums.phpfreaks.com/topic/37768-wildcards/#findComment-180665 Share on other sites More sharing options...
timlondon Posted February 9, 2007 Author Share Posted February 9, 2007 Thanks Quote Link to comment https://forums.phpfreaks.com/topic/37768-wildcards/#findComment-180672 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.