如下,使用方法:
MySqlParameter[] canshu = { new MySqlParameter("?creator",MySqlDbType.VarChar) };
canshu[0].Value = "test1";
DataSet ds = MySqlHelper.ExecuteDataSet(MySqlHelper.connectionString, CommandType.Text, "select * from new_table where creator=?creator", canshu);
补充一个connectionString
private static String connectionString = "server=localhost;user id=test1;password=123123;database=lab";