C# 关于sql语句参数化时,like参数没有值

本来语句是这样,但是死活没有值
if (!string.IsNullOrEmpty(input.参数))
{
sqlWhere += $" and a.tym like ‘%@参数%’";
parameters.Add(new MySqlParameter("@参数", input.参数));
}
然后改为
if (!string.IsNullOrEmpty(input.参数))
{
sqlWhere += $" and a.tym like @参数";
parameters.Add(new MySqlParameter("@参数", “%”+input.参数+"%"));
}

MySqlParameter这个对象,第一个参数是参数名,第二个是参数值,所以我们直接给值来加%就好了

最近发现经常忘了很多代码技巧,以后开始记录自己的代码小技巧

如果以上文章帮助到了您,不论在任何时候,请点个关注,谢谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This textbook evolved from a course in geophysical inverse methods taught during the past two decades at New Mexico Tech, first by Rick Aster and, subsequently, jointly between Rick Aster and Brian Borchers. The audience for the course has included a broad range of first- or second-year graduate students (and occasionally advanced under- graduates) from geophysics, hydrology, mathematics, astrophysics, and other disciplines. Cliff Thurber joined this collaboration during the production of the first edition and has taught a similar course at the University of Wisconsin-Madison. Our principal goal for this text is to promote fundamental understanding of param- eter estimation and inverse problem philosophy and methodology, specifically regarding such key issues as uncertainty, ill-posedness, regularization, bias, and resolution. We emphasize theoretical points with illustrative examples, and MATLAB codes that imple- ment these examples are provided on a companion website. Throughout the examples and exercises, a web icon indicates that there is additional material on the website. Exercises include a mix of applied and theoretical problems. This book has necessarily had to distill a tremendous body of mathematics and science going back to (at least) Newton and Gauss. We hope that it will continue to find a broad audience of students and professionals interested in the general problem of estimating physical models from data. Because this is an introductory text surveying a very broad field, we have not been able to go into great depth. However, each chapter has a “notes and further reading” section to help guide the reader to further explo- ration of specific topics. Where appropriate, we have also directly referenced research contributions to the field. Some advanced topics have been deliberately left out of this book because of space limitations and/or because we expect that many readers would not be sufficiently famil- iar with the required mathematics. For example, readers with a strong mathematical background may be surprised that we primarily consider inverse problems with discrete data and discretized models. By doing this we avoid much of the technical complexity of functional analysis. Some advanced applications and topics that we have omitted include inverse scattering problems, seismic diffraction tomography, wavelets, data assimilation, simulated annealing, and expectation maximization methods. We expect that readers of this book will have prior familiarity with calculus, dif- ferential equations, linear algebra, probability, and statistics at the undergraduate level. In our experience, many students can benefit from at least a review of these topics, and we commonly spend the first two to three weeks of the course reviewing material from

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值