Wednesday, 28 January 2009

%, as Wildcard Usage, in Mysql



For example '2%' would match the following: 20, 25, 2000000, 2avkldj3jklsaf, and 2!

$result = mysql_query("SELECT * FROM example WHERE age LIKE '2%' ")
or die(mysql_error());

No comments:

My photo
London, United Kingdom
twitter.com/zhengxin

Facebook & Twitter