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". 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%') 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 Link to comment https://forums.phpfreaks.com/topic/37768-wildcards/#findComment-180672 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.